Skip to content

Instantly share code, notes, and snippets.


Stephen Celis stephencelis

View GitHub Profile
subtleGradient / appify
Created Nov 11, 2010
appify. Create the simplest possible mac app from a shell script
View appify
#!/usr/bin/env bash
# url :
# version : 2.0.2
# name : appify
# description : Create the simplest possible mac app from a shell script.
# usage : cat | appify MyApp
# platform : Mac OS X
# author : Thomas Aylott <>
DrBoolean / mcft.js
Created Dec 30, 2015
Monoidal Contravariant Functors and Transducers
View mcft.js
const daggy = require('daggy');
const {foldMap} = require('pointfree-fantasy')
const {concat, toUpper, prop, identity, range, compose} = require('ramda');
// Contravariant functors usually have this shape F(a -> ConcreteType).
// In other words, some type holding a function which is parametric on its input, but not output.
// They don't always have that shape, but it's a good intuition
// Covariant functors are what we're used to, which are parametric in their output
JeffreyWay / gist:1525217
Created Dec 27, 2011
Instant Server for Current Directory
View gist:1525217
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
bkeating /
Created Mar 11, 2010
HOWTO: Using FileMerge (opendiff) with Git on OSX

HOWTO: Using FileMerge (opendiff) with Git on OSX

FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.

The following method works by creating a simple bash script ( that sets us up with the proper command line arguments for Git to pass off files to FileMerge.

gruber / gist:1063605
Created Jul 4, 2011
Simple Inbox Archiving Script for Apple Mail
View gist:1063605
-- See article here:
-- The following should be one long line:
set _description to "All unflagged, read messages in each IMAP account
inbox will be moved to the “Archive” mailbox corresponding to that
account. This action is not undoable."
tell application "Mail"
display alert "Archive read messages from IMAP inboxes?" buttons ¬
{"Cancel", "Archive"} cancel button 1 message _description
uasi / vim.rb
Created Nov 30, 2010
Vim formula for Homebrew (EDIT: recent versions of official Homebrew distribution includes one)
View vim.rb
require 'formula'
class Vim < Formula
homepage ''
url ''
head ''
sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d'
version '7.3.682'
def features; %w(tiny small normal big huge) end
View not_class.rb
class Object
def not
class NotClass < BasicObject
instance_methods.grep(/^[^_]/).each { |m| undef_method m }
def initialize(object)
marcel / gist:2100703
Created Mar 19, 2012
giftube – Generates an animated gif from a YouTube url.
View gist:2100703
#!/usr/bin/env ruby
# giftube – Generates an animated gif from a YouTube url.
# Usage:
# giftube [youtube url] [minute:second] [duration]
# ex.
natecook1000 / NSTimer+Closure.swift
Last active Aug 1, 2019
Scheduled NSTimer with a Swift closure
View NSTimer+Closure.swift
extension NSTimer {
Creates and schedules a one-time `NSTimer` instance.
- Parameters:
- delay: The delay before execution.
- handler: A closure to execute after `delay`.
- Returns: The newly-created `NSTimer` instance.
View coroutines.swift
import Cocoa
enum CoroutineState {
case Fresh, Running, Blocked, Canceled, Done
struct CoroutineCancellation: ErrorType {}
class CoroutineImpl<InputType, YieldType> {
let body: (yield: YieldType throws -> InputType) throws -> Void