⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
request = require('request'), // request module from https://github.com/mikeal/request | |
url = require('url'); | |
http.createServer(function (req, res) { | |
var href = url.parse(req.url,true).href; | |
request('http://127.0.0.1:5984' + href).pipe(res); | |
}).listen(1337); | |
// now try something like http://127.0.0.1:1337/your_db_name/_all_docs/?limit=10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 | |
let s:calendar_list = [ | |
\ ['Australian Holidays', 'en.australian#[email protected]'], | |
\ ['Austrian Holidays', 'en.austrian#[email protected]'], | |
\ ['Brazilian Holidays', 'en.brazilian#[email protected]'], | |
\ ['Canadian Holidays', 'en.canadian#[email protected]'], | |
\ ['China Holidays', 'en.china#[email protected]'], | |
\ ['Christian Holidays', 'en.christian#[email protected]'], | |
\ ['Danish Holidays', 'en.danish#[email protected]'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ======================================== | |
-- Author: Christopher Webb | |
-- Web: http://conspirator.co | |
-- Twitter: http://twitter.com/conspirator | |
-- ======================================== | |
set finderPath to "" | |
tell application "Finder" | |
try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /path/to/node | |
var haibu = require('/path/to/haibu'); | |
var client = new haibu.drone.Client(); | |
process.stdin.resume(); | |
process.stdin.on('data', function(data){ | |
var package = JSON.parse(data.toString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//################################################################ STYLUS MIXIN | |
// Colors | |
$lavender = #9569bb | |
$pink = #f468f9 | |
$white = #fff | |
$black = #000 | |
$grayDark = #333 | |
$grayMed = #666 | |
$grayLight = #999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = require 'fs' | |
ID3 = require 'node-id3' | |
findit = require 'findit' | |
cradle = require 'cradle' | |
db = new(cradle.Connection)().database('music') | |
allowed_files = [ 'mp3', 'aiff', 'wav', 'ogg' ] | |
mnt = [ | |
'/Users/<username>/Music', | |
'/Users/<username>/Podcasts' ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
OlderNewer