Skip to content

Instantly share code, notes, and snippets.

Chris Dzombak cdzombak

Block or report user

Report or block cdzombak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
andyfowler / mixins.css
Created Nov 16, 2010
Used in less.js
View mixins.css
/* ===================================== */
/* = Some less.js mixins from Nutshell = */
/* ===================================== */
.rounded-corners (@radius: 5px) {
border-radius: @radius;
-moz-border-radius: @radius;
-webkit-border-radius: @radius;
.drop-shadow (@x:0, @y:1px, @feather:1px, @color:#fff) {
View gist:704579
# need to fix a corrupted repo because I have a local branch I need to recover
# first, backup the corrupted git repo
# get a fresh clone
$ git clone git://mydomain.local/awesomerepo.git; cd awesomerepo
$ mv .git/objects/pack/*.pack /tmp/.
$ git unpack-objects < /tmp/*.pack # unpack all the git objects.
# you need to move the pack file out of the
# git repo. See git-unpack-objects's man page:
sjl / gist:1118817
Created Aug 1, 2011
OS X Text Editor Waves
View gist:1118817

Pre- OS X

  • BBEdit
  • Vim
  • Emacs


  • TextMate
  • SubEthaEdit
View git-walk.rb
#!/usr/bin/env ruby
# Walks up and down revisions in a git repo.
# Usage:
# git walk next
# git walk prev
case ARGV[0]
when "next"
rev_list = `git rev-list --children --all`
refs = rev_list.scan(/[a-z0-9]{40}(?= )/)
maxogden /
Created Sep 28, 2011

Your API does REST, but can it SLEEP?

SLEEP (Syncable Lightweight Event Emitting Persistence) is an emerging standard for distributed data sync using HTTP and JSON. A generalized version of CouchDB's much lauded built-in replication, SLEEP extends the REST architecture to define a way in which databases can offer syncable JSON APIs that foster open data innovation by allowing developers to replicate entire databases over the net.

SLEEP comes from the Apache CouchDB project which is now widely known for it's multi-master streaming HTTP + JSON replication. This is possible in part because of the CouchDB _changes feed, which is a particular API that lets you see if there have been any changes made to the database since last time you synchronized. CouchDB can efficiently implement the _changes feed because of one subtle difference between it and most other databases: it stores a history of all changes that happen to the database, including deletes.

If you synchronize data from a remote source and then the

jonsterling / gist:1541947
Created Dec 30, 2011
Configuring UITableViews with C99 array initialization!
View gist:1541947
// Define your table view's sections
typedef enum {
kTitleSection = 0,
} NESTemplateEditTableSections;
// Make configuration arrays indexed against table sections.
// It's safe to reorder the original enum!
static NSString * const kCellIdentifiers[kNumberOfSections] = {
andrewsardone / gist:1827605
Created Feb 14, 2012
Creating a custom UITableViewCell
View gist:1827605

[Apple's Documentation][appledoc1]

Option 1: Programmatic Setup and Subview Manipulation

No UITableViewCell subclass

Add subviews to a cell's contentView, or tweak properties of a certain cell style's subviews.


andrewsardone / gist:1935008
Created Feb 28, 2012
I'm finally making two-stage object creation work for me ;-)
View gist:1935008
#import <SenTestingKit/SenTestingKit.h>
#import "OCMock.h"
#import "NLPageControlScrollViewHelper.h"
#pragma mark - Tests
@interface NLPageControlScrollViewHelperTests : SenTestCase
erikh /
Created Mar 31, 2012 — forked from DAddYE/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
jessedearing / gist:2351836
Created Apr 10, 2012 — forked from twoism-dev/gist:1183437
Create self-signed SSL certificate for Nginx
View gist:2351836
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key
openssl rsa -in -out myssl.key
You can’t perform that action at this time.