Skip to content

Instantly share code, notes, and snippets.

@spheiros
spheiros / osx-for-hackers.sh
Last active October 21, 2015 10:53 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
git clone https://github.com/leamas/spotify-make.git
cd spotify-make
./configure --user
make download
make install
make register
~/bin/my-spotify
@spheiros
spheiros / gist:c30290e4c50ec1d94a5d
Created November 12, 2014 16:04
Find city and region from zipcode using Google Geotagging API
$.ajax({
url: 'https://maps.googleapis.com/maps/api/geocode/json',
data: {
address: loc,
language: $('.container').data('lang')
},
success: function(results, status) {
results.results[0].address_components.forEach(function(i) {
if ($.inArray('administrative_area_level_2', i.types) !== -1) {
return $('input[name=region]').val(i.long_name);
@spheiros
spheiros / func.js
Created April 23, 2014 03:54
js typing delay
// http://stackoverflow.com/a/1909508
var delay = (function(){
var timer = 0;
return function(callback, ms){
clearTimeout (timer);
timer = setTimeout(callback, ms);
};
})();