Skip to content

Instantly share code, notes, and snippets.

View psynaptic's full-sized avatar

Richard Burford psynaptic

View GitHub Profile
<?php
$colors = array(
'BLACK' => NCURSES_COLOR_BLACK,
'WHITE' => NCURSES_COLOR_WHITE,
'RED' => NCURSES_COLOR_RED,
'GREEN' => NCURSES_COLOR_GREEN,
'YELLOW' => NCURSES_COLOR_YELLOW,
'BLUE' => NCURSES_COLOR_BLUE,
'CYAN' => NCURSES_COLOR_CYAN,
[alias]
e = config --global --edit
s = status -s
st = status
ci = commit -m
cl = clone
br = branch
co = checkout
praise = blame
wtf = blame
$conf['acsf_local_development'] = TRUE;
$conf['preprocess_css'] = FALSE;
$conf['preprocess_js'] = FALSE;
$conf['file_directory_path'] = conf_path() . '/files';
$conf['file_temporary_path'] = conf_path() . '/files/tmp';
$conf['acsf_local_user_accounts'] = TRUE;
$conf['acquia_gardens_local_user_accounts'] = TRUE;
$conf['acquia_gardens_keep_js_css_caching_off'] = TRUE;
$conf['gardens_client_site_verification_status'] = array('verified' => TRUE);
$conf['gardens_client_send_stats'] = FALSE;
@psynaptic
psynaptic / gist:9923121
Last active August 29, 2015 13:57
install oh-my-zsh and bash_kit on acquia servers
wget --quiet --no-check-certificate http://install.ohmyz.sh -O - | sh
wget --quiet --no-check-certificate https://gist.githubusercontent.com/psynaptic/a99d49fe24089360850c/raw/a5422fcdef76cc82c4ea1ef90f22bb9db0840759/gistfile1.sh -O - | sh
@psynaptic
psynaptic / new_gist_file.sh
Created March 27, 2014 01:20
import gzip mysql database
gunzip < database.sql.gz | mysql -uroot database
@psynaptic
psynaptic / gist:9777251
Created March 26, 2014 05:14
truncate all drupal cache tables by sql query
select concat('truncate table ', TABLE_NAME, ';') from information_schema.tables where TABLE_NAME like 'cache%';
function wiki() {
red='\e[0;31m'
yellow='\e[0;33m'
cyan='\e[0;36m'
search=$(echo $@ | sed -e 's/ /_/g')
blob=$(dig +short txt ${search}.wp.dg.cx)
if [ -z "$blob" ]; then
echo "${red}No result found."
return 1
fi
<link href="http://dev.drupalcontrib.org/api/opensearch/drupal/7.x" title="Drupal API Drupal 7.x" rel="search" type="application/opensearchdescription+xml" />
<link href="http://dev.drupalcontrib.org/api/opensearch/drupal/4.6.x" title="Drupal API Drupal 4.6.x" rel="search" type="application/opensearchdescription+xml" />
<link href="http://dev.drupalcontrib.org/api/opensearch/drupal/4.7.x" title="Drupal API Drupal 4.7.x" rel="search" type="application/opensearchdescription+xml" />
<link href="http://dev.drupalcontrib.org/api/opensearch/drupal/5.x" title="Drupal API Drupal 5.x" rel="search" type="application/opensearchdescription+xml" />
<link href="http://dev.drupalcontrib.org/api/opensearch/drupal/6.x" title="Drupal API Drupal 6.x" rel="search" type="application/opensearchdescription+xml" />
<link href="http://dev.drupalcontrib.org/api/opensearch/drupal/8.x" title="Drupal API Drupal 8.x" rel="search" type="application/opensearchdescription+xml" />
<link href="http://dev.drupalcontrib.org/api/opensearch/about_
/* api.drupal.org syntax highlighting */
pre.php {
background-color: #EDF1F3;
border: 1px solid #ccc;
padding: 3px;
}
pre.php code,
pre.php p {
<?php
function orchid_preprocess_page(&$variables) {
_orchid_conditional_stylesheets($variables);
}
function _orchid_conditional_stylesheets(&$variables) {
$themes = list_themes();
$theme = $GLOBALS['theme'];
$query_string = substr(variable_get('css_js_query_string', '0'), 0, 1);