Skip to content

Instantly share code, notes, and snippets.

View ltk's full-sized avatar

Lawson Jaglom-Kurtz ltk

View GitHub Profile
@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 / 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 / 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"
},
@ltk
ltk / post.md
Last active August 29, 2015 14:27
Connor Lay Blog Post 08/2015

Slimming Down Your Models and Controllers with Concerns, Service Objects, and Tableless Models.

The Single Responsibility Principle

“A class should have one, and only one, reason to change.” - Uncle Bob

The single responsibility principle asserts that every class should have exactly one responsibility. In other words, each class should be concerned about one unique nugget of functionality, whether it be User, Post or InvitesController. The objects instantiated by these classes should be concerned with sending and responding to messages pertaining to their responsibility and nothing more.

Fat models, thin controllers

@ltk
ltk / responder.rb
Created April 6, 2015 18:12
Graba Slack Responder
class Slack::Responder
def initialize(message)
@message = message
end
def respond?
response.present?
end
@ltk
ltk / _demo.js
Last active August 29, 2015 14:10
Web Audio Handbell Sound Component
window.AudioContext = window.AudioContext || window.webkitAudioContext
var Bell = require('./Bell')
var bell = new Bell( new AudioContext() )
bell.ring('c4')
@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";