Skip to content

Instantly share code, notes, and snippets.

@taboularasa
taboularasa / a-linkdump.md
Last active December 13, 2015 17:39
some links i should read

This is a dump of links to checkout for later.

@taboularasa
taboularasa / .laptop.local
Created October 12, 2015 03:38
after laptop
#!/bin/sh
brew_tap 'caskroom/cask'
brew_install_or_upgrade 'brew-cask'
brew cask install google-chrome
sudo mv /opt/homebrew-cask/Caskroom/google-chrome/latest/Google\ Chrome.app /Applications
brew cask install chromium
brew cask install firefox
@taboularasa
taboularasa / gist:2946941
Created June 18, 2012 05:08
scrape parallel flickr backup for lightroom import
import re
import sys
import os
from stat import *
import subprocess
import shlex
import hashlib
import time
import datetime
import pymongo
@taboularasa
taboularasa / gist:2943538
Created June 17, 2012 05:46
Rotate a cellphone video with ffmpeg
$ffmpeg -i <input file> -threads <max threads> -vf "transpose=1" -s 1280x720 -r <frame rate> -sameq <output file>
@taboularasa
taboularasa / gist:2045181
Created March 15, 2012 16:38
ubuntu /var/www permissions
sudo usermod -a -G www-data <some_user>
sudo chgrp -R www-data /var/www
sudo chmod -R g+w /var/www
sudo find /var/www -type d -exec chmod 2775 {} \;
sudo find /var/www -type f -exec chmod ug+rw {} \;
@taboularasa
taboularasa / yelpSoup.py
Created November 27, 2011 22:47
list of cities and categories in yelp
from BeautifulSoup import BeautifulSoup
import urllib2
f = urllib2.urlopen('http://www.yelp.com/developers/documentation/neighborhood_list')
raw = f.read()
soup = BeautifulSoup(raw)
places = soup.find('ul', {'class':'attr-list'})
@taboularasa
taboularasa / gist:1314844
Created October 26, 2011 00:00
select everything but a certain category
$("article").not(".category-tutorials").hide();
@taboularasa
taboularasa / version1.js
Created October 24, 2011 22:48
Here is the loop to get all the text from in the ancor tags
for (i = 0; i < items.length ; i ++){console.log($(items[i]).html());}
@taboularasa
taboularasa / gist:1269165
Created October 7, 2011 00:57
IR Target 3
String inString = "";
boolean keepReading = false;
const int ledPin = 13;
const int irTarget = 2;
int ledState = LOW;
unsigned long previousMillis = 0;
long interval = 0;
unsigned long offTime = 0;
boolean isOff = false;