Skip to content

Instantly share code, notes, and snippets.

@samgro
samgro / FSQSplitViewController.h
Last active July 13, 2016 01:27
FSQSplitViewController
//
// FSQSplitViewController.h
//
// Copyright (c) 2015 Foursquare. All rights reserved.
//
#import "FSCoreViewController.h"
NS_ASSUME_NONNULL_BEGIN;
@samgro
samgro / defaults.css
Created February 20, 2012 05:58
Default font styling
body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 300;
font-size: 16px;
line-height: 24px;
}
@samgro
samgro / hash_to_url_params.rb
Created October 28, 2011 21:50
One liner for converting a params hash to url encoded string
def hash_to_url_params(params)
'?' + URI.encode(params.map { |key, value| "#{key}=#{value}" }.join('&'))
end
jQuery.placeholder = function() {
$('[placeholder]').focus(function() {
var input = $(this);
if (input.hasClass('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
if (input.val() === '') {