Sync a fork of a repository to keep it up-to-date with the upstream repository. https://help.github.com/articles/syncing-a-fork/
git fetch upstream
git checkout master
git merge upstream/master| (function() { | |
| var data = {}, html, url, i; | |
| $('td.sa-sortingColumn a').each(function() { | |
| var url = $.trim($(this).attr('title')); | |
| data[url] = $(this).closest('tr').find('td.sa-ta-left a').map(function() { | |
| return $(this).attr('href'); | |
| }).get(); | |
| }); |
| #!/bin/sh | |
| projectname=$1 | |
| wget https://www.drupal.org/download-latest/zip -O drupal-latest.zip | |
| unzip drupal-latest.zip -d $projectname | |
| foldername=$(ls -1 $projectname) | |
| mv $projectname/$foldername/* $projectname/ | |
| mv $projectname/$foldername/.* $projectname/ | |
| rm -rf $projectname/$foldername |
| <?php | |
| if (!isset($argv)) { | |
| die("This script only works in cli mode.\n"); | |
| } | |
| if (!isset($argv[1])) { | |
| die("Usage: " . $argv[0] . " <SITE_URL>\n"); | |
| } |
| COMMIT; | |
| SET unique_checks=1; | |
| SET foreign_key_checks=1; |
| SET autocommit=0; | |
| SET unique_checks=0; | |
| SET foreign_key_checks=0; |
| cd webroot | |
| # Beware! When in windowws environment any error message will prevent all files from being copied to your desidered location! | |
| drush make profiles/PROFILE/make/PROFILE.make -y |
| <?php | |
| define('DRUPAL_ROOT', getcwd()); | |
| require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; | |
| drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
| drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION); | |
| drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE); | |
| $result = db_query('SELECT * FROM users'); | |
| foreach($result as $item) { |
Sync a fork of a repository to keep it up-to-date with the upstream repository. https://help.github.com/articles/syncing-a-fork/
git fetch upstream
git checkout master
git merge upstream/master| (function(root, name) { | |
| function bind(fn, context) { | |
| // Save original args, but remove the first 2 arguments (fn, context). | |
| var outerArgs = Array.prototype.splice.call(arguments, 2); | |
| return function() { | |
| // Wipe out first argument, which is a "event" object. | |
| var innerArgs = Array.prototype.splice.call(arguments, 1); | |
| return fn.apply(context, innerArgs.concat(outerArgs)); | |
| } |