Skip to content

Instantly share code, notes, and snippets.

@Noleli
Noleli / gist:5137133
Created March 11, 2013 19:50
Project Amy console log
3/11/13 2:49:40.781 PM imagent[31333]: [Warning] Exception: NSConcreteMutableAttributedString initWithString:: nil value
3/11/13 2:49:40.784 PM imagent[31333]: [Warning] Symbols: (
0 CoreFoundation 0x00007fff86d480a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff877793f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff86d47e7c +[NSException raise:format:] + 204
3 Foundation 0x00007fff8b172f12 -[NSConcreteMutableAttributedString initWithString:] + 121
4 IMFoundation 0x00007fff8ff9bb71 JWUUIDPushObjectToString + 2017
5 IMFoundation 0x00007fff8ff75150 _IMITunesInteropAvailable + 1013
6 IMFoundation 0x00007fff8ff8d1b1 IMFontSizeFromCSSFontSizeValue + 10913
7 IMDaemonCore 0x00007fff8b6a4bfe IMDCallMonitorCallStatusChanged + 386321022
@Noleli
Noleli / gist:3344522
Created August 13, 2012 22:28
Put a jekyll blog in a subdir /jekyll and rewrite it to webroot
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ jekyll/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ jekyll/$1 [L]
</IfModule>
@Noleli
Noleli / gist:2897965
Created June 8, 2012 20:23
Untangld database schema
CREATE TABLE `entities` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` enum('PERSON','PLACE','BUSINESS','MUNICIPALITY') DEFAULT NULL,
`name` varchar(64) DEFAULT NULL,
`timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`url` varchar(256) DEFAULT NULL,
`prevurl` varchar(256) DEFAULT NULL,
`notes` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
@Noleli
Noleli / gist:2764146
Created May 21, 2012 19:29
Uninstall GoogleSoftwareUpdateAgent
sudo /Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/GoogleSoftwareUpdateAgent.app/Contents/Resources/install.py --nuke
@Noleli
Noleli / gist:2694935
Created May 14, 2012 16:31
JSONify form
formdata = $('#theform').serializeArray();
data = {};
$(formdata).each(function() {
data[this.name] = this.value;
});
data = JSON.stringify(data);
overlaps = []
for postword in post:
matchcount = 0
wordmatches = []
for bncword in bnc:
if(postword['word'] == bncword['word']):
bnclogf = math.log(float(bncword['count']))
wordmatches.append({'word': postword['word'],
'postlogf': postword['logf'],
'bnclogf': bnclogf,
Noahs-MacBook:octopress noah$ gem install bundler
Successfully installed bundler-1.1.2
1 gem installed
Installing ri documentation for bundler-1.1.2...
Installing RDoc documentation for bundler-1.1.2...
Noahs-MacBook:octopress noah$ bundle install
ERROR: Gem bundler is not installed, run `gem install bundler` first.
@Noleli
Noleli / gist:1019008
Created June 10, 2011 15:06
Inline Olark
<div id='olark-box-container'></div>
<script type="text/javascript">
olark.configure('box.inline', true);
olark.configure('box.start_expanded', true);
</script>