Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# vim7.4
./configure --disable-selinux \
--enable-perlinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7/config \
--enable-python3interp \
--enable-rubyinterp \
--enable-multibyte \
@HomenSimpsor
HomenSimpsor / mailchimp.txt
Created May 1, 2013 13:51
Minimal version of a Mailchimp accepted text only newsletter
Hello
Sincerely,
Organization name
*|LIST:ADDRESS|*
*|LIST:PHONE|*
Update your profile:
@HomenSimpsor
HomenSimpsor / mediawiki.css
Last active December 16, 2015 09:48
Override styles for MediaWiki's default "Vector" theme
/**
* Explicit fonts
*/
div,
td,
li,
p {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@HomenSimpsor
HomenSimpsor / gitCron.sh
Created March 19, 2013 12:41
Midnight rollout of new branch via cron
0 0 * * * /usr/local/bin/git --git-dir=/hsphere/local/home/user/domain.com/.git checkout -f v1.2
@HomenSimpsor
HomenSimpsor / formatSql.vim
Created March 8, 2013 19:37
Assuming the SQL has capitalized keywords
:set noic
:s`\v\s@<=[A-Z]@=`^M`g
@HomenSimpsor
HomenSimpsor / textLine.vim
Last active December 14, 2015 15:48
Act on lines that aren't surrounded by punctuation
:%s`\v(^\s+)@<=([a-z])@=`<p>` " put <p> at the beginning of every line that starts with a-z
:%s`\v[a-z]@<=$`</p>` " put a </p> on the end
@HomenSimpsor
HomenSimpsor / singleInserts.sh
Created March 6, 2013 16:24
Dump data only, one insert per line
mysqldump --no-create-info --extended-insert=FALSE etc.
@HomenSimpsor
HomenSimpsor / getIncrement.sql
Created March 5, 2013 20:41
Get table autoincrement value
SELECT TABLE_ROWS
FROM information_schema.tables
WHERE table_name='table'
AND table_schema = DATABASE();
@HomenSimpsor
HomenSimpsor / superPrinter.php
Last active December 14, 2015 07:19
Used for error_logging a bunch of variables all at once.
<?php
$label = 'test';
$data = array (
'label' => $datum
);
$logs[] = array($label, $data);
foreach ($logs as $log):
list($label, $data) = $log;
foreach ($data as $key => $value):
if (is_array($value)):
@HomenSimpsor
HomenSimpsor / edit-in-2-dirs.sh
Last active December 14, 2015 07:19
Edit any files in two directories that match
vim $(find interface library | xargs grep -RIsl 'Date Display Format' | sort | uniq)