Skip to content

Instantly share code, notes, and snippets.

View DeMarko's full-sized avatar
🏠
Working from home

Dannel Jurado DeMarko

🏠
Working from home
View GitHub Profile
# 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
# 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'
@jstn
jstn / JSTN.css
Last active March 1, 2021 02:28
limechat theme
/*
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
@bgreenlee
bgreenlee / check_echo_nest.py
Created December 20, 2012 02:06
Check for available band names from @bwhitman's "Ten Thousand Statistically Grammar-Average Fake Band Names" (http://alumni.media.mit.edu/~bwhitman/10000.html) using The Echo Nest #python #music #fun
#!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})
@munhitsu
munhitsu / gist:1034876
Last active November 29, 2020 09:10
python 2.7.5 install on OSX (10.8+) using brew (pip, easy_install, virtualenv, virtualenvwrapper)
# 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
@74hc595
74hc595 / rebeccablack.py
Created March 17, 2011 18:16
Displays the day of the week in the style of legendary singer/songwriter Rebecca Black.
#!/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
@sjl
sjl / google-jslint.vim
Created December 2, 2010 17:13
Use Google's JSLint with Vim. Now you can use :make when in a .js file to run gjslint on it and get a list of errors in the quickfix window. This was thrown together hastily and Vim's errorformat is confusing as hell, so feel free to fork and improve
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
#!/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