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 / 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

@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 / fermi-paradox.md
Last active February 11, 2021 23:23
notes on the fermi paradox

fermi paradox

universe is huge

  • 100b stars in milky way
  • 100b galaxies in observable universe
  • 10^22 stars available
  • sun-like stars 5-20% (est 1%)
  • possible earth-like planets 22-50% (est 10%)
  • estimate 1% of earth-like planets develop life
@ryantuck
ryantuck / postgres_information_schema_stuff.sql
Last active August 24, 2016 13:30
some helpful postgres queries regarding schemas and stuff
-- show all schema information
select * from information_schema.schemata;
-- find which schema a table is in
select
table_schema
from
information_schema.tables
where
@ryantuck
ryantuck / postgres-json.sql
Last active July 27, 2016 00:52
helpful postgres json queries
-- find rows where a certain key exists
select
*
from
my_table
where
json_field::jsonb ? 'key_i_want'
;
-- get certain key from json field
@ryantuck
ryantuck / pg_stat_activity.sql
Last active July 18, 2016 21:26
utils for viewing and killing queries
-- view interesting information for all queries for a user
select
pid,
client_addr,
application_name,
(current_timestamp - query_start) as duration,
state,
query
from
pg_stat_activity
@ryantuck
ryantuck / lambda_talk.md
Created July 16, 2016 23:24
pygotham lambda talk
  • set up lambda (basic execution role)
  • just api call and return
  • incorporate boto3 writing to dynamodb
  • change input to handle date range or payload etc
  • change success message

testing in browser - woo fun, but let's make an api endpoint

  • make api endpoint with POST
  • test in browser
@ryantuck
ryantuck / sql-tricks.md
Created July 28, 2016 14:58
some helpful sql tricks

find any rows where multiple ids exist:

select
  *
from
  my_table
where
  id in (
 select
@ryantuck
ryantuck / superintelligence.md
Last active December 27, 2022 21:25
notes on superintelligence

superintelligence

"an intellect that is much smarter than the best human brains in practically every field, including scientific creativity, general wisdom and social skills."

  • artificial general intelligence, as opposed to specialized AI
  • either computer intelligence or human-augmented intelligence
  • kurzweil - not pessimistic, multiple AIs, cloud-augmented minds
  • silicon operates orders of magnitude faster (1M x) than neurons, parallelization
  • humans outperform animals in long-term planning and language use rather than biology - AI would probably do the same
  • AIs could edit and improve themselves so rapidly that we must expect a fast take-off once machines hit human-level intelligence