Skip to content

Instantly share code, notes, and snippets.

View AlexRiina's full-sized avatar

Alex Riina AlexRiina

View GitHub Profile
@renoirb
renoirb / extractcss.js
Last active January 20, 2020 10:19
Extract CSS for a given element
/**
* Based on work from krasimirtsonev
*
* http://krasimirtsonev.com/blog/article/csssteal-chrome-extension-that-extracts-css
*/
// helper function for transforming
// node.children to Array
function toArray (obj, ignoreFalsy) {
var arr = [], i;
@stpe
stpe / youtube_topicIDs.md
Last active April 6, 2024 22:36
YouTube Topic IDs

Music topics

  • /m/04rlf Music
  • /m/05fw6t Children's music
  • /m/02mscn Christian music
  • /m/0ggq0m Classical music
  • /m/01lyv Country
  • /m/02lkt Electronic music
  • /m/0glt670 Hip hop music
  • /m/05rwpb Independent music
@ktuite
ktuite / mturk_boto_intro.py
Last active August 19, 2020 07:06
Super simple python script that uses boto to connect to amazon mturk. If you use the sandbox, you'll see a balance of $10,000! Otherwise, you'll see your normal balance.
import boto.mturk.connection
sandbox_host = 'mechanicalturk.sandbox.amazonaws.com'
real_host = 'mechanicalturk.amazonaws.com'
mturk = boto.mturk.connection.MTurkConnection(
aws_access_key_id = 'XXX',
aws_secret_access_key = 'XXX',
host = sandbox_host,
debug = 1 # debug = 2 prints out all requests. but we'll just keep it at 1