Skip to content

Instantly share code, notes, and snippets.

View psynaptic's full-sized avatar

Richard Burford psynaptic

View GitHub Profile
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
@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%';
@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: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
$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;
[alias]
e = config --global --edit
s = status -s
st = status
ci = commit -m
cl = clone
br = branch
co = checkout
praise = blame
wtf = blame
<?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,
call pathogen#infect()
call pathogen#helptags()
syntax on
set background=dark
colorscheme solarized
au BufNewFile,BufRead *.module set filetype=php
au BufNewFile,BufRead *.test set filetype=php
au BufNewFile,BufRead *.install set filetype=php
➜ mobile git:(ticket-8194) ✗ cd ~/.vim/bundle
➜ bundle git clone git://github.com/tpope/vim-pathogen.git
➜ bundle ll
total 64K
drwxr-xr-x 5 rburford rburford 4.0K Dec 12 03:57 drupal-snippets
drwxr-xr-x 6 rburford rburford 4.0K Dec 12 04:20 Gist.vim
drwxr-xr-x 9 rburford rburford 4.0K Dec 12 06:05 neocomplcache
drwxr-xr-x 5 rburford rburford 4.0K Dec 12 04:35 ns9tks-vim-l9-tip
drwxr-xr-x 4 rburford rburford 4.0K Dec 12 03:52 snipmate-snippets
drwxr-xr-x 5 rburford rburford 4.0K Dec 13 10:04 supertab
snippet php
<?php ${1} ?>
snippet kpr
kpr(${1});
snippet gdv
kpr(get_defined_vars());
snippet print
<?php print ${1}; ?>