cd ~/Projects
git clone https://github.com/facebook/xhprof.git xhprof.YOURDOMAIN
cd xhprof.YOURDOMAIN/extension
phpize
CFLAGS="-arch x86_64 -arch i386"
./configure
make
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Wysiwyg make file. Specify core version below. | |
; Place in Drupal root and run from the drupal | |
; root directory with | |
; drush make ckedit.make --no-core . | |
core = 6.x | |
;core = 7.x | |
api = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Place this file in e.g ~/.drush. | |
* See `drush topic docs-aliases` for more info. | |
*/ | |
// Use require_once since this file is invoked multiple times. | |
require_once('git_remote_alias.php'); | |
git_remote_alias_set('live', $aliases); | |
git_remote_alias_set('staging', $aliases); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
var passThrough = false; | |
var track = function(el, action) { | |
_gaq.push(["_trackEvent", "Connect/Log in", action]); | |
passThrough = true; | |
_gaq.push(function() { | |
$(el).trigger("click"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
from fabric.api import * | |
from urlparse import urlparse | |
def task(project): | |
try: | |
# User can set their project directory with | |
# export PROJECT_DIR= in their shell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Drupal 6 | |
$settings_file = '/Users/anders/Projects/drupal-6.local/public_html/sites/default/settings.php'; | |
require($settings_file); | |
$parsed_db_url = parse_url($db_url); | |
$parsed_db_url['database'] = substr($parsed_db_url['path'], 1); | |
$parsed_db_url['password'] = $parsed_db_url['pass']; | |
$parsed_db_url['username'] = $parsed_db_url['user']; | |
$parsed_db_url['prefix'] = $db_prefix; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Munge emails and reset passwords. | |
UPDATE users SET mail = CONCAT(name, '@localhost'), init = CONCAT(name, '@localhost'), pass = 'pass'; | |
-- UPDATE authmap SET authname = CONCAT(aid, '@localhost'); | |
-- Remove irrelevant data that bulks up the dump and contains IP-addresses | |
TRUNCATE cache; | |
TRUNCATE cache_block; | |
TRUNCATE cache_bootstrap; | |
TRUNCATE cache_field; | |
TRUNCATE cache_filter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import os.path | |
import re | |
import subprocess | |
import shutil | |
destination = "/Users/USER/Projects/SITE/public_html/sites/all/modules/feauters" | |
module = re.compile(r".*/(PREFIX)[^/]*.tar$") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_preprocess(). | |
*/ | |
function manniskohjalp_preprocess(&$vars, $hook) { | |
// Static variable used for passing data from preprocess functions, | |
// e.g from preprocess-view to preprocess-page. | |
$manniskohjalp_shared = &drupal_static(__FUNCTION__, array()); | |
$vars['manniskohjalp_shared'] = $manniskohjalp_shared; | |