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
View SrslySingleton.h
//
// DUXClientsManager.h
//
//
// Created by Kevin Vitale on 3/25/14.
//
//
@class RACSignal;
View git-flip-flop.py
#!/usr/bin/env python
#
# git-flip-flop: checks out two or more commits in a periodic cycle
#
# Save on your $PATH as git-flip-flop
#
# EXAMPLES
#
# Check out abc1234, then def5678, then abc1234, etc, with
# the default 2s between each checkout
@jmont
jmont / curriedfuncs.m
Last active Aug 29, 2015
Curried Functions in Swift
View curriedfuncs.m
// Curried Functions in Swift
// Juan C. Montemayor (@norsemelon)
// Excerpt From: Apple Inc. “The Swift Programming Language.” iBooks. https://itun.es/us/jEUH0.l
// Syntax: func name (x1: t1)(x2: t2) -> t { ... }
// Note: it has a paren pair for every variable, as opposed to `(x1: t1, x2: t2)`
func addTwoNumbers(a: Int)(b: Int) -> Int {
return a + b
}
@mattbischoff
mattbischoff / LCKIndexedFetchedResultsController.h
Last active Aug 29, 2015
LCKIndexedFetchedResultsController is a NSFetchedResultsController subclass that attempts to solve the problem of sorting a fetched collection into correctly alphabetized sections for every locale. It does things like making sure that the `#` character shows up at the bottom instead of the top of the section index titles.
View LCKIndexedFetchedResultsController.h
//
// LCKIndexedFetchedResultsController.h
// Quotebook
//
// Created by Andrew Harrison on 7/26/14.
// Copyright (c) 2014 Lickability. All rights reserved.
//
@import CoreData;
@andyfowler
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
sjl / gist:1118817
Created Aug 1, 2011
OS X Text Editor Waves
View gist:1118817

Pre- OS X

  • BBEdit
  • Vim
  • Emacs

2003/2004

  • 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}(?= )/)
refs.unshift(rev_list[/[a-z0-9]{40}/])
@jonsterling
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,
kGoalSection,
kNumberOfSections
} NESTemplateEditTableSections;
// Make configuration arrays indexed against table sections.
// It's safe to reorder the original enum!
static NSString * const kCellIdentifiers[kNumberOfSections] = {
@andrewsardone
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.

Example:

You can’t perform that action at this time.