pear.php.net is down, (To connect to pear.php.net insecurely, use --no-check-certificate)

Dec 5, 2015

Compiling PHP7 and https://pear.php.net is down! Oh no! Don’t panic, simply open the /tmp/php-src/Makefile with an editor and search and replace https://pear.php.net/install-pear-nozlib.phar with http://pear.php.net/install-pear-nozlib.phar Or just use the following sed: sed -i 's/https:\/\/pear.php.net\/install-pear-nozlib.phar/http:\/\/pear.php.net\/install-pear-nozlib.phar/g' /tmp/php-src/Makefile Installing PEAR environment: /usr/local/php7/lib/php/ --2015-12-03 11:24:08-- https://pear.php.net/install-pear-nozlib.phar Resolving pear.php.net (pear.php.net)... 5.35.241.22 Connecting to pear.php.net (pear.php.net)|5.35.241.22|:443... connected. ERROR: no certificate subject alternative name matches requested host name ‘pear.php.net’. To connect to pear.php.net insecurely, use `--no-check-certificate'. make: ***

Continue Reading →

Importing Default Content module with Drupal 8 (default_content)

Oct 13, 2015

When developing with Drupal 8 at the moment, you may be reinstalling multiple times due to bugs, or simply pulling the latest HEAD release. If you have custom entities, or even custom content types, this can be tiresome to constantly readd the content, or to have to have some sort of Drush command to do this for you. This is where Default content comes in handy. You can simply export the entities into your module, then when you reinstall the module those entities will be recreated for you.

Continue Reading →

Linux (Ubuntu 14.04), nVidia and the case of the horrible Chrome 35 tearing

Oct 12, 2015

So Chrome recently released their version 35, which causes mass issues across distros - Ubuntu, Arch Linux etc. This can be easily solved by running the dev version of Chrome until they finally fix it for stable - you can grab the dev version here: http://www.chromium.org/getting-involved/dev-channel This fixes the black screen resize issue, crashes, menu glitches and every other problem that plagues users of Chrome 35. The dev version may be unstable, if it is - try the BETA and see if that fixes it for you (as of 2014-06-07 it does not for me).

Continue Reading →

Atom.io on Linux

Oct 12, 2015

git clone https://github.com/atom/atom script/build sudo script/grunt install

Continue Reading →

Clone all git repositories from BitBucket

Oct 12, 2015

#!/bin/bash #Script to get all repositories under a user from bitbucket #Usage: getAllRepos.sh [username] curl -u ${1} https://api.bitbucket.org/1.0/users/${1} > repoinfo for repo_name in `grep \"name\" repoinfo | cut -f4 -d\"` do git clone [email protected]:${1}/$repo_name.git done Credit to Harold Soh (http://haroldsoh.com/2011/10/07/clone-all-repos-from-a-bitbucket-source/) for the original source.

Continue Reading →

Curl file to remote FTP

Oct 12, 2015

curl -T somefile.tar.bz2 ftp://example.com –user myuser:mypass

Continue Reading →

Linux Dropbox symlink with nginx permission error fix

Oct 12, 2015

Simply doing a `chmod 755 ~/Dropbox fixed the issue, but will mess with your permissions.

Continue Reading →

Drupal 7 - Get custom fields for a node/product

Oct 12, 2015

For example for Drupal Commerce: $data = field_info_instances("commerce_product","product");

Continue Reading →

Drupal 8 - How to get Drush to run on a Linux distro

Oct 12, 2015

Now that Drush has [url=https://github.com/drush-ops/drush/commit/59159ef5fa2c4a648f3ee750d3f527cb8d557f62]removed support for Pear[/url], and running the drush.php manually is currently not working, you are “forced” to use Composer. If you don’t follow this way, you will get an error like: Unable to load autoload.php. Drush now requires Composer in order to install its depedencies and autoload classes. Please see README.md If you do not currently have composer installed you will need to download and install it, see [url=https://getcomposer.org/doc/00-intro.md]https://getcomposer.org/doc/00-intro.md[/url] for instructions.

Continue Reading →

Create a role with all permissions with Drupal 7

Oct 12, 2015

Self explanatory code: ``` $admin_role = new stdClass(); // Set the role name here $admin_role->name = ‘bogus’; // Save the role, so that we can assign permissions to it user_role_save($admin_role); // Grant all permissions to the this new role. user_role_grant_permissions($admin_role->rid, array_keys(module_invoke_all(‘permission’))); ```

Continue Reading →


Author

Josh Taylor

Josh Taylor