Skip to content

Instantly share code, notes, and snippets.

View array.swift
class ArrayImpl<T> {
var space: Int
var count: Int
var ptr: UnsafeMutablePointer<T>
init(count: Int = 0, ptr: UnsafeMutablePointer<T> = nil) {
self.count = count = count
y0ast /
Last active Nov 23, 2015
Tutorial for using Torch7 on Amazon EC2 GPUs

There used to be a tutorial here for using Torch7 on EC2, but it's now outdated. It is best to use an EC2 image that already has Torch7 and CUDA stuff preinstalled.

elithrar /
Last active Sep 28, 2020
WAL-E + Postgres 9.x (single server + DB) Setup and Recovery

A quick "how to" on what you need to do to both setup AND recover a single-server PostgreSQL database using WAL-E

  • WAL-E:
  • Assuming Ubuntu 12.04 LTS ("Precise")
  • We'll be using S3. Make sure you have an IAM in a group with GetObject, ListBucket and PutObject on the bucket you want to use (and that it's not public).


  1. These packages:
jehiah /
Created Jan 19, 2014
email notify at system boot time
# *************************************************
# chkconfig: 2345 99 99
# description: notify email address on system boot.
# *************************************************
# Installing:
# 1) save as /etc/rc.d/init.d/notify
# 2) set the desired email address in "MAILADD" variable
# 3) chmod a+w /etc/rc.d/init.d/notify
jehiah /
Created Jan 19, 2014
Nagios Monitor for the rate pages are swapped in/out
# Show the rate of swapping (in number of pages) between executions
jehiah /
Created Jan 19, 2014 script to monitor system fork rate with nagios
# Copyright bitly, Aug 2011
# written by Jehiah Czebotar
fs111 / gist:7013230
Created Oct 16, 2013
These are the notes from my talk about lingual during the big data beer meetup in Berlin:
View gist:7013230

Lingual - ANSI SQL for apache hadoop

Big Data Beers Berlin, October 16th 2013


  • André Kelpe | @fs111 | andre[at]concurrentinc[dot]com
  • works for concurrent inc (
    • company behind Cacading and Lingual


dergachev /
Last active Jan 25, 2021
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF


To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

mattt /
Created Nov 26, 2012
NSHipster Call for Tips & Tricks!

Howdy howdy, NSHipsters!

If you alloc init an NSCalendar, you'll notice that New Year's Eve falls on a Monday this year, a.k.a. "the day NSHipster is published every week". What fun!

So in celebration of the upcoming year++, I thought it'd be fun to compile a list of some of your favorite tips and tricks of the trade. Submit your favorite piece of Objective-C trivia, framework arcana, hidden Xcode feature, or anything else you think is cool, and you could have it featured in the year-end blowout article. Just comment on this gist below!

Here are a few examples of the kind of things I'd like to see:

larsxschneider /
Created Oct 31, 2012 — forked from agnoster/
View/edit a file in a pull request by clicking on the line number.
* 1) Use
* 2) Install this into ~/.js/
* 3) Click on a line number in the editor to open the file at this position (e.g. to see more context)
* 4) Alt+Click on a line number in the editor to edit the file at this position
* This script is based on @agnoster's idea:
function getBranch() {