git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| # based on answer in this post: https://security.stackexchange.com/questions/183948/unix-command-to-generate-cryptographically-secure-random-string | |
| LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c61 | 
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| sudo du -d 1 -h | sort -h | 
| function THEME_process_html(&$vars) { | |
| if (variable_get('environment') == 'development' && !stristr($_GET['q'],'flush-cache')) { | |
| $vars['styles'] = preg_replace('/\.css\?.*"/','.css"', $vars['styles']); | |
| $vars['scripts'] = preg_replace('/\.js\?.*"/','.js"', $vars['scripts']); | |
| } | |
| } | 
| var fs = require('fs'); | |
| var file = __dirname + '/test.json'; | |
| fs.readFile(file, 'utf8', function (err, data) { | |
| if (err) { | |
| console.log('Error: ' + err); | |
| return; | |
| } | |
| data = JSON.parse(data); | 
| On a POSIX operating system (e.g. Linux or OS X) you can write the following into your Bash shell: | |
| wc -l `find . -iname "*.php"` | |
| //source: | |
| //http://stackoverflow.com/questions/790956/count-lines-in-a-php-project | 
| private function parseFields($object) { | |
| if (is_object($object)) { | |
| $object = (array)$object; | |
| } | |
| if (is_array($object)) { | |
| $arr = array(); | |
| foreach ($object as $key => $val) { | |
| if ($key !== '@') { | |
| $arr[$key] = $this->parseFields($val); | |
| } | 
| $data = drupal_json_encode($SOME_ARRAY); | |
| $path = drupal_get_path('module', '[MODULE_NAME]') . '/test/mockup/FILE_NAME.json'; | |
| file_unmanaged_save_data($data, $path, FILE_EXISTS_REPLACE); | 
| db.users.findOne({"services.twitter.id":""}); |