Skip to content

Instantly share code, notes, and snippets.

View farrellit's full-sized avatar

Dan Farrell farrellit

View GitHub Profile
@felixgr
felixgr / hidnative.c
Created May 27, 2017 07:37
Remove Caps Delay MBP15 Touchbar Late 2016
// Build:
// clang hidnative.c -o hidnative -framework IOKit -framework CoreFoundation
//
// Run:
// sudo ./hidnative
#include <IOKit/hid/IOHIDManager.h>
#include <IOKit/hid/IOHIDKeys.h>
#include <IOKit/IOKitLib.h>
#include <CoreFoundation/CoreFoundation.h>
@arturovm
arturovm / GAEGoMap.go
Created December 8, 2012 21:31
This is a re-implementation of the GAE Go runtime Map type.
package main
import (
"reflect"
"appengine"
"appengine/datastore"
)
// define Map
@angstwad
angstwad / test_split_jinja_ansible.yml
Created March 31, 2014 14:24
Splitting in Jinja2/Ansible
---
- name: Test split
hosts: localhost
gather_facts: false
vars:
- facter_blockdevices: "sda,sdb,sdc,sdd,sde,sdf"
tasks:
- name: Let's split
debug: var=item
with_items: "facter_blockdevices.split(',')"
@kgrz
kgrz / sinatra_regex_routing_one.rb
Last active July 3, 2017 18:37
Sinatra's regex routing and captures block example
require "sinatra"
get %r{/([\w]+)/foo} do |bar|
puts bar
end