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
#!/bin/sh | |
"exec" "`dirname $0`/python" "$0" "$@" | |
"exit $?" | |
print('hello from my double entendre script!') | |
print('a python script that runs as both sh that then runs the same script as sh') | |
raise Exception("things didn't go well: check my exit code is 1") |
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
"\e[B": history-search-forward | |
"\e[A": history-search-backward | |
"\e[C": forward-char | |
"\e[D": backward-char | |
"\e[1;6D": backward-word | |
"\e[1;6C": forward-word | |
set show-all-if-ambiguous on |
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
# ` is an interesting key for a prefix | |
set-option -g prefix ` | |
set -g window-status-bg yellow | |
# we need literal ` sometimes, allow switching | |
# we can also send the prefix char with `-a | |
bind-key C-b set-option -g prefix C-b | |
bind-key C-v set-option -g prefix ` | |
bind-key ` last-window |
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
"use strict"; | |
/* | |
const duplexer2 = require('duplexer2') | |
const {Readable, Writable} = require('stream') | |
*/ | |
const duplexer = require('duplexer2') | |
const child_process = require('child_process') |
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
select * from keyword_campaigns where campaign_id = 1205; |
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
select * from keyword_campaigns where keyword = 'halloween'; |
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
import random | |
import sqlite3 | |
conn = sqlite3.connect('btreedemo.sqlite') | |
c = conn.cursor() | |
c.execute('''DROP TABLE IF EXISTS keyword_campaigns''') | |
c.execute('''CREATE TABLE keyword_campaigns | |
(keyword, campaign_id, budget, spent, primary key(keyword, campaign_id)) without rowid''') |
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
def logger(fn): | |
start = time() | |
fn() | |
end = time() | |
print("time taken was: ", end - start) | |
return inner |
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
"use strict"; | |
function* aGenerator() { | |
throw new Error("rarg") | |
} | |
function runner() { | |
var gen = aGenerator() | |
gen.next() | |
} |
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
# ` is an interesting key for a prefix | |
set-option -g prefix ` | |
set -g window-status-bg yellow | |
# we need literal ` sometimes, allow switching | |
# we can also send the prefix char with `-a | |
bind-key C-b set-option -g prefix C-b | |
bind-key C-v set-option -g prefix ` | |
bind-key ` last-window |
NewerOlder