Skip to content

Instantly share code, notes, and snippets.

@bomberstudios
bomberstudios / sketch-diff-in-git.md
Last active May 17, 2024 02:53
How to diff your .sketch files in Git

Using sketchtool to diff your .sketch files using text

Requirements

You need to have SketchTool installed somewhere in your path.

Setup

Add this in your ~/.gitconfig file (for some reason, it won't work in a local .gitconfig file):

@chriseidhof
chriseidhof / Main.swift
Last active March 11, 2016 06:59
Protocol Extensions
protocol OptionalType {
typealias T
var optional: T? { get }
}
extension Optional : OptionalType {
var optional: T? { return self }
}
extension SequenceType where Generator.Element: OptionalType {
@soffes
soffes / Mixpanel.swift
Last active August 30, 2016 18:47
Simple Mixpanel event tracking in Swift
// Moved to https://github.com/soffes/Mixpanel
@jpotts18
jpotts18 / Alamofire-JSON-Serialization.md
Last active August 17, 2020 15:44
Alamofire JSON Serialization of Objects, Collections, Nesting

Alamofire JSON Serialization of Objects and Collections

Alamofire is a great Swift library developed by the creator of AFNetworking @mattt. The purpose of this gist is to explain how to use the built-in power of Alamofire to serialize your JSON. In this example we will be serializing a simple blog API. First we will start with serializing a single JSON object and add complexity as we go along.

Warning: This was written before Swift 1.2

A Single JSON Serialization

This is the first JSON object that we will be serializing.

anonymous
anonymous / gulpfile.js
Created April 20, 2014 18:51
'use strict';
var dotenv = require('dotenv');
dotenv.load();
var gulp = require('gulp');
var runSequence = require('run-sequence');
var awspublish = require('gulp-awspublish');
var bump = require('gulp-bump');
@brandur
brandur / force-reset.md
Last active January 3, 2022 16:07
Force pull request's diff to reset itself against target branch

Force pull request's diff to reset itself against target branch

git checkout feature-branch
# empty commit; don't worry, this will not show up in the final pull
git commit --allow-empty -m "Empty commit"
git push origin feature-branch
# hard reset to before empty commit
git reset --hard HEAD~
git push -f origin feature-branch
@jbenet
jbenet / simple-git-branching-model.md
Last active November 9, 2024 04:55
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@max
max / gist:5824480
Last active December 18, 2015 18:19

Designing in s/Photoshop/Code

Would you be interested in a workshop at Heroku to learn more about one or all of these things:

  • Using Framer.js to breathe life into your static comps
  • Building prototypes with fake/real data in HTML/CSS, and a minimum of Javascript (Angular.JS)
  • Prototyping native iOS and OS X apps in code
  • Running prototypes/static apps on Heroku to share them with your team

All of these workshops would be for designers with rudimentary web design skills. Aka these things are meaningful to you:

@h3h
h3h / 0-resume-template.md
Last active July 28, 2016 13:07
Ideal Resume Format for a Software Engineer

https://github.com/[yourname]

Ambition

[Describe ambitions: type of work, attributes of team, what you want to learn & teach]

Experience

[in reverse chronological order, list at most 5 positions or 10 years back, whichever is fewer]