Skip to content

Instantly share code, notes, and snippets.

CGFloat BNRTimeBlock (void (^block)(void));
curl -s -XPOST localhost:9200/_bulk?pretty=true --data-binary '
{ "index" : { "_index" : "parent_child", "_type" : "store", "_id" : "store1" } }
{ "name" : "auchan", "owner" : "chris" }
{ "index" : { "_index" : "parent_child", "_type" : "department", "_id" : "department1", "parent" : "store1" } }
{ "name" : "toys", "numberOfProducts" : 150 }
{ "index" : { "_index" : "parent_child", "_type" : "product", "_id" : "product1", "parent" : "department1", "routing" : "store1" } }
{ "name" : "gun", "trademark" : "tiger", "price" : 9, "store_id" : "store1" }
'
@import UIKit;
NS_ASSUME_NONNULL_BEGIN
@protocol MFBPreviewableCollectionView
- (nullable NSIndexPath *)mfb_previewableCollectionIndexPathForItemAtPoint:(CGPoint)point;
- (CGRect)mfb_previewableCollectionItemRectForIndexPath:(NSIndexPath *)indexPath;
@skeeet
skeeet / gist:73043a4c519c1e4ce5f7
Created July 10, 2014 07:33
saltstack-newrelic.sls
newrelic-add-repo:
cmd.run:
- name: echo deb http://apt.newrelic.com/debian/ newrelic non-free >> /etc/apt/sources.list.d/newrelic.list
- unless: grep "deb http://apt.newrelic.com/debian/ newrelic non-free" /etc/apt/sources.list.d/newrelic.list
newrelic-trust-repo:
cmd.run:
- name: wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add -
- unless: apt-key list | grep "New Relic"
@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 / 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. ###
##############################################################################################################

Keybase proof

I hereby claim:

  • I am skeeet on github.
  • I am skt (https://keybase.io/skt) on keybase.
  • I have a public key whose fingerprint is 8200 3360 8AF5 28FF 1561 D73E AF1F 4F9B DB85 8720

To claim this, I am signing this object:

@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

//
// 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 / 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]