Skip to content

Instantly share code, notes, and snippets.

@skeeet
skeeet / setup.md
Created March 13, 2017 20:22 — forked from fortunto2/setup.md
Setup Amazon AWS EC2 g2.2xlarge instance with OpenCV 3.1, Cuda 7.5, ffmpeg, OpenFace
@skeeet
skeeet / tmux-cheatsheet.markdown
Created February 27, 2017 11:45 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@skeeet
skeeet / gist:8cb0e34811229883d58f704640cc2658
Created September 19, 2016 22:01 — forked from boredzo/gist:4604459
Two-color angle gradient in Core Image
kernel vec4 coreImageKernel(__color startColor, __color endColor)
{
vec2 point = destCoord();
float angle = atan(point.y, point.x) + radians(180.0);
//Start from the upper middle, not the left middle
angle += radians(90.0);
angle = mod(angle, radians(360.0));
float fraction = angle / radians(360.0);
@skeeet
skeeet / fish_lazy_commits.sh
Created September 10, 2016 05:27 — forked from orta/fish_lazy_commits.sh
Fish versions of my bash commands from Lazy Automation
# http://artsy.github.io/blog/2016/03/02/Lazily-Automation/
function git_branch_info
git branch ^/dev/null | grep \* | sed 's/* //'
end
function branch
git checkout master;
git pull upstream master;
git checkout -b $argv[1]
//
// HudlHlsAvPlayerCache.m
// Hudl
//
// Created by Brian Clymer on 3/6/15.
// Copyright (c) 2015 Agile Sports Technologies, Inc. All rights reserved.
//
#import "HudlHlsAvPlayerCache.h"
@skeeet
skeeet / README.md
Created July 26, 2016 06:17 — forked from andyshinn/README.md
CoreOS on Digital Ocean using Terraform

Terraform, CoreOS, and Digital Ocean

Let's use Terraform to easily get a CoreOS cluster up on Digital Ocean. In this example we will get a 5 node CoreOS cluster up and running on the Digital Ocean 8GB size.

Install Terraform

Grab a copy of Terraform for your platform from http://www.terraform.io/downloads.html. Follow the instructions at http://www.terraform.io/intro/getting-started/install.html by getting Terraform in your PATH and testing that it works.

Digital Ocean API Key

@skeeet
skeeet / set_project_profiles.sh
Created July 4, 2016 13:18 — forked from tehnoir/set_project_profiles.sh
Update Xcode project's build settings to point to current provisioning profiles.
#!/bin/bash
##############################################################################################################
### 1. Name your profiles with the convention of ProjectName_TargetName_ConfigurationName.mobileprovision ###
### 2. Create a directory called CodeSign in your project directory ###
### 3. Move all your project's provisioning profiles into the CodeSign directory ###
### ###
### Running this script will update your project file to point to the correct UUIDs of each corresponding ###
### profile in your CodeSign directory. ###
##############################################################################################################
@skeeet
skeeet / coursera.sh
Created June 12, 2016 06:28 — forked from bburky/coursera.sh
Automatically configure a VM download Coursera courses
#!/bin/bash
# Automatically configure a VM download Coursera courses.
# This script works as a user data file for use with a cloud VM.
# This script will resume downloading if the VM is restarted.
# This script works with Debian jessie (or possibly Ubuntu with systemd).
# You must enroll in each course and accept the Honor of Code of each course
# before you can download them.
@skeeet
skeeet / hamburger.swift
Created June 8, 2016 11:43 — forked from MrAlek/hamburger.swift
Example of how to use presentation, animation & interaction controllers w/ custom segues to create a slide-in modal menu which partially covers presenting view.
import UIKit
enum Direction {
case Left, Right, Up, Down
var pointVector: CGPoint {
switch self {
case Left: return CGPoint(x: -1, y: 0)
case Right: return CGPoint(x: 1, y: 0)
case Up: return CGPoint(x: 0, y: -1)
@import UIKit;
NS_ASSUME_NONNULL_BEGIN
@protocol MFBPreviewableCollectionView
- (nullable NSIndexPath *)mfb_previewableCollectionIndexPathForItemAtPoint:(CGPoint)point;
- (CGRect)mfb_previewableCollectionItemRectForIndexPath:(NSIndexPath *)indexPath;