Skip to content

Instantly share code, notes, and snippets.

Avatar
📊

Harrison Shoff hshoff

📊
View GitHub Profile
View full-saturn.md

screen shotty

Based on Saturn by @psql

Full Saturn is an updated color theme of Spacegray by @kkga.

If you already have Theme - Spacegray installed skipped to step 5.

Janky manual install due to laziness

@hshoff
hshoff / PrettyPrint.js
Last active Aug 29, 2015
Pretty print objects with JSON.stringify
View PrettyPrint.js
function print(obj) {
console.log(JSON.stringify(obj, null, 2));
};
print({one:1,two:[{name:'charles',label:'barkley'},{name:'han',label:'solo'}]};
// {
// "one": 1,
// "two": [
// {
View Prefences.sublime-settings
{
"auto_match_enabled": true,
"bold_folder_labels": true,
"caret_style": "wide",
"color_scheme": "Packages/Theme - Spacegray/base16-eighties2.dark.tmTheme",
"draw_minimap_border": true,
"draw_indent_guides": true,
"fade_fold_buttons": false,
"font_size": 13.0,
"highlight_active_indent_guide": true,
@hshoff
hshoff / base16-eighties2.dark.tmTheme
Created Mar 22, 2014
my laser beam edition of spacegray
View base16-eighties2.dark.tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Chris Kempson (http://chriskempson.com)</string>
<key>name</key>
<string>Base16 Eighties Dark</string>
<key>semanticClass</key>
<string>base16.eighties.dark</string>
View FIle.sublime-settings.json
{
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
// Note that the font_face and font_size are overriden in the platform
// specific settings file, for example, "Base File (Linux).sublime-settings".
// Because of this, setting them here will have no effect: you must set them
// in your User File Preferences.
"font_face": "Monaco",
"font_size": 12,
View gist:5032222
SELECT u.country, COUNT(distinct user_id), COUNT(distinct hosting_id), COUNT(*)
FROM users u
JOIN hostings h ON (u.id = h.user_id)
JOIN reservations r ON (u.id = r.host_id)
WHERE h.has_availability = '1' AND r.status = '1' AND r.created_at >= '2011-01-01'
GROUP BY u.country;
View gist:5032195
SELECT d, COUNT(*)
FROM test_table
WHERE d >= '2012-05-01'
GROUP BY d
ORDER BY d ASC;
View gist:4121262
// module1.js
;(function() {
console.log('module1');
})()
// crockford module1.js
;(function(){
console.log('module1');
}())
View gist:4121244
// crockford problem
(function(){console.log('module1');}())(function(){console.log('module2');}());
// => module1
// => module2
// => TypeError: undefined is not a function
// it invokes module1
(function(){ console.log('module1'); }())
// => module1
View gist:4121239
// it invokes module1
(function(){ console.log('module1'); return function(){ console.log(arguments); };}())
// => module1
//it invokes module2
(function(){ console.log('module2'); }());
// => module2
// equivalent
(function(){ console.log(arguments); })(undefined)
You can’t perform that action at this time.