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 / xmas
Created November 26, 2014 01:12
rt-notes
# Stuff to do for Listmas app
- add index to present model to return sorted stuff
- test barebones socket.io setup
-
Sensor Ideas for Kegbot
Gesture sensor - https://www.sparkfun.com/products/12787
Force sensitive resistor - https://www.sparkfun.com/products/9375
Humidity/temp sensor - https://www.sparkfun.com/products/8257
Microphone - https://www.sparkfun.com/products/9964
Photocell - https://www.sparkfun.com/products/9088
RFID reader - https://www.sparkfun.com/products/9963
Analog panel meter - https://www.sparkfun.com/products/10286
pH sensor - https://www.sparkfun.com/products/12872
@ryantuck
ryantuck / brew-ruby.md
Created January 21, 2016 16:27
just install ruby.

install ruby when you don't do much ruby but want to download a gem

when gem install trello_cli yields permission errors:

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

you should download another ruby and use that as the default.

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()
import arrow
import pprint
start = '2015-01-01'
end = '2015-01-02'
s = arrow.get(start)
e = arrow.get(end)
print s
import pandas as pd
data = [
[1,2],
[3,4],
[5,6]
]
cols = ['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],
[4,5],
[8,9]
]
df = pd.DataFrame(data, columns=['a','b'])
@ryantuck
ryantuck / trello-inboxing-script.md
Last active February 17, 2016 14:51
GTD-inspired inboxing to trello via the command line

wanna do this!?

inbox do something tomorrow that i just remembered about but don't want to leave the command line

install trello-cli

instructions in the readme. they're easy.

https://github.com/brettweavnet/trello_cli

@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