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
#!/usr/bin/env ruby | |
# == Synopsis | |
# jsonpretty: a quick script for making JSON output legible | |
# | |
# == Usage | |
# jsonpretty [a JSON encoded file] | |
# [some stream with JSON text] | jsonpretty | |
# | |
# For this help use: jsonpretty -h |
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
#!/usr/bin/env python | |
# | |
# rebeccablack.py | |
# Displays the day of the week in the style of legendary | |
# singer/songwriter Rebecca Black. | |
# | |
# Definitely not written by Matt Sarnoff | |
# | |
# TODO: | |
# - translate to other languages |
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
au BufNewFile,BufRead *.js set makeprg=gjslint\ % | |
" The ^G at the end is an actual <Ctrl-G> char. | |
" Gist won't let me include it, so you'll have to delete the last two characters | |
" and insert it yourself with <Ctrl-V><Ctrl-G> | |
au BufNewFile,BufRead *.js set errorformat=%-P-----\ FILE\ \ :\ \ %f\ -----,Line\ %l\\,\ E:%n:\ %m,%-Q,%-GFound\ %s,%-GSome\ %s,%-Gfixjsstyle%s,%-Gscript\ can\ %s,%-G^G |
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
#!python | |
import requests | |
import time | |
API_KEY = '<YOUR KEY>' | |
# names saved from http://alumni.media.mit.edu/~bwhitman/10000.html | |
for name in open("names.txt"): | |
name = name.strip() | |
r = requests.get('http://developer.echonest.com/api/v4/artist/profile', params={'api_key': API_KEY, 'name': name}) |
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
# In case you had some strange python installation | |
# NOTE: .pydistutils.cfg seems to be not compatible with brew install python | |
# areas I needed to clean before installation | |
# clean up ~/Library/Python | |
# clean up .local | |
# preconditions: | |
# xcode with command line tools installed | |
xcode-select --install |
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
/* | |
JSTN THEME FOR LIMECHAT 1.0 | |
put this and the other thing in ~/Library/Application Support/LimeChat/Themes/ | |
bg 1a2230 | |
hlight 273146 | |
red e44347 | |
purps 8b84d0 | |
fuscia c2339a |
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
# Seems supported in $TERM_PROGRAM_VERSION 370 | |
> cat nsterm-256color | |
# A xterm-256color based TERMINFO that adds the escape sequences for italic. | |
xterm-256color|xterm with 256 colors and italic, | |
sitm=\E[3m, ritm=\E[23m, | |
use=xterm-256color, | |
> tic nsterm-256color | |
> ENV TERM=nsterm-256color tput sitm; echo italics |
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
# MAC manipulators | |
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`' | |
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE' |