Skip to content

Instantly share code, notes, and snippets.

View ryantuck's full-sized avatar
🤙
chillin'

Ryan Tuck ryantuck

🤙
chillin'
View GitHub Profile
@ryantuck
ryantuck / aws-lambda-stuff.md
Created March 17, 2016 19:01
notes on aws lambda

aws lambda

some stuff to know about deploying a function to aws lambda:

function itself

main.py should look like this:

function handler_fn(event, context):
@ryantuck
ryantuck / nginx-osx.md
Created February 29, 2016 01:50
install nginx for a simple localhost server on OSX

nginx on OSX

I was trying to open some index.html file that attempts to load in a json file and got the following error:

Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.

Turns out this error gets thrown in chrome if your web page isn't being served up via a proper webserver credits here

@ryantuck
ryantuck / trello-inboxing-script.md
Last active February 17, 2016 14:51
GTD-inspired inboxing to trello via the command line
@ryantuck
ryantuck / ansible-localhost.md
Last active July 29, 2025 02:00
super fast way to start testing ansible stuff locally without VMs

set up ansible to work on localhost

i've found this useful for debugging ansible modules and syntax without having to use VMs or test in dev environments.

install ansible

pip install ansible

make some relevant config files

how to be leet with your keyboard remappings

0. install seil and karabiner.

1. change esc to shift + cmd in ~/Library/Application Support/Karabiner/private.xml:

<?xml version="1.0"?>
<root>
import pandas as pd
data = [
[1,2],
[3,4],
[4,5],
[8,9]
]
df = pd.DataFrame(data, columns=['a','b'])
def fn(*args, **kwargs):
print kwargs
print '{a} {b}'.format(**kwargs)
fn(a='blah', b='asdf')
import pandas as pd
data = [
[1,2],
[3,4],
[5,6]
]
cols = ['a','b']
import arrow
import pprint
start = '2015-01-01'
end = '2015-01-02'
s = arrow.get(start)
e = arrow.get(end)
print s
from passlib.hash import pbkdf2_sha256
import time
passwd = 'asdf'
for x in range(0,20):
r = pow(2,x)
t0 = time.time()
h = pbkdf2_sha256.encrypt(passwd, rounds=r, salt_size=16)
t1 = time.time()