Skip to content

Instantly share code, notes, and snippets.

View ltk's full-sized avatar

Lawson Jaglom-Kurtz ltk

View GitHub Profile
@ltk
ltk / kloud.rb
Created October 4, 2013 02:30
A simple screen shot uploader. New screen shots are uploaded to your own S3 bucket, their URLs are copied to your clipboard, and you receive a OS X notification that links directly to the file on S3 in Chrome.
require 'aws-sdk'
require 'listen'
require 'pathname'
require 'terminal-notifier'
module Kloud
class Application
attr_reader :directory, :screen_shots
def initialize(directory)
@ltk
ltk / config
Created August 5, 2014 19:22
Split Test Load Balancer Nginx Configuration
map $split_test_cookie_name $split_test_cookie {
default $cookie_split_test_version;
}
upstream app.com {
server old.app.com;
}
split_clients "app${remote_addr}${http_user_agent}${date_gmt}" $upstream_variant {
10% "test";
@ltk
ltk / instructions.txt
Created March 9, 2018 17:56
[SXSW] React Native Workshop Instructions
Hi folks,
Thanks for RSVPing to the “Building iOS & Android Apps with React Native” workshop at SXSW!
This workshop is built around technical exercises. In order to participate in these exercises, we ask that you:
- Bring a computer and either an iOS or Android device with you to the workshop
- Install XDE (https://docs.expo.io/versions/latest/introduction/installation.html) on your computer before you arrive
- Install the Expo app (https://expo.io/tools#client) on your iOS or Android device before you arrive
Thanks, and we look forward to seeing you all Sunday!
@ltk
ltk / gradient_descent.rb
Created April 30, 2013 13:11
Ruby implementation of a gradient descent linear regression algorithm
def params
[0,0]
end
def examples
[
{
:x => 1,
:y => 3
},
@ltk
ltk / keybase.md
Created August 9, 2016 22:01
Keybase Proof

Keybase proof

I hereby claim:

  • I am ltk on github.
  • I am ltk (https://keybase.io/ltk) on keybase.
  • I have a public key whose fingerprint is 3645 8287 A73B B0A6 8876 40F8 A6C4 FAE0 A291 54CE

To claim this, I am signing this object:

@ltk
ltk / notes.md
Last active February 10, 2016 16:21
Dev Lab Leadership | Alternative Structure

Ideas

Cabinet

2-3 elected & termed cabinet positions distribute management work typically assigned to managing director

  • Secretary of Staffing (POC for all staffing related affairs... could be combined with Sec of State, but probably would be too much)
  • Secratary of the Interior (leads internal team initiatives)
  • Secretary of State (ambassador to the rest of the company)
@ltk
ltk / test-processes.js
Created February 2, 2016 21:52
BaaS at Scale | Load Test Process Spawning
const spawn = require('child_process').spawn
// How many connections to build with Firebase
const maxChildren = 1250
// How long to keep child processes alive
const timeout = 10 * 60 * 1000 // 10 minutes
for (var i = 0; i < maxChildren; i++) {
// your-test.js should contain your application-specific test
@ltk
ltk / update-subscriptions.js
Created February 2, 2016 21:51
BaaS at Scale | Update Subscription Granularity
// Method 1: High Data Usage
// =========================
const rootReference = new Firebase(firebaseUrl)
const itemsReference = rootReference.child('items')
itemsReference.on('value', function(data) {
// Update the UI with the items update
})
@ltk
ltk / input_output.txt
Created May 1, 2013 18:35
Input/Output
Input
|---------------------------------------|
| Search Phrase | Total Searches |
| ======================================|
| Lemurs | 1,000 |
| durham bulls | 500 |
| bull fighting | 100 |
| lemur dance | 2,000 |
| Durham | 700 |
| How to catch a lemur | 35 |
@ltk
ltk / rules.json
Last active December 9, 2015 22:54
puppy bowl firebase rules
{
"rules": {
".read": false,
".write": false,
"broadcast": {
".read": true,
".write": "root.child('users/' + auth.uid + '/admin').val() === true"
},