Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
git shortlog -sn | cut -f2 | sort --ignore-case > CONTRIBUTORS
Verifying that +stefanotamagnini is my blockchain ID. https://onename.com/stefanotamagnini
@yoghi
yoghi / osx-for-hackers.sh
Created January 8, 2016 22:46 — 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'
#!/usr/bin/env php
<?php
/**
* Generates a naturally sortable UUID in a distributed environment.
* UUID's are 120-bit represented in base62 as 20 in length and are composed of:
* - a time stamp in microseconds (from 1970-01-01 until 3180-01-01; ~1,200 years if using a custom epoch)
* - the machine's MAC address
* - the running process' id
*/
class UniqueId {
@yoghi
yoghi / gist:4277504
Created December 13, 2012 16:10
RestKit connect to rest service behind basic autentication
NSString *url = @"http://rest.local/test";
NSURL *baseURL = [NSURL URLWithString:url];
AFHTTPClient* client = [[AFHTTPClient alloc] initWithBaseURL:baseURL];
[client setAuthorizationHeaderWithUsername:@"demo" password:@"demo"];
[client setDefaultHeader:@"Accept" value:RKMIMETypeJSON];