Skip to content

Instantly share code, notes, and snippets.

View zmillman's full-sized avatar
🐥

Zach Millman zmillman

🐥
View GitHub Profile
@zmillman
zmillman / event_naming.md
Last active July 15, 2021 22:17
Event naming guidelines/styleguide

There are problems with this design. Don't use it in prod

  • We should have a naming grammar which uses adjectives end note

Event table columns:

  • id (primary key) - unique event id
  • name (string) - event name
  • user_id (int) - identifies the actor responsible for triggering the event
  • distinct_id (string) - uuid from device or session token
@zmillman
zmillman / Rakefile
Last active August 29, 2015 14:16
Using OkHTTP crashes application
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/android'
begin
require 'bundler'
Bundler.require
rescue LoadError
end
@zmillman
zmillman / gson_request.rb
Created February 21, 2015 00:28
Can't compile subclass of com.android.volley.Request
class GsonRequest < Com::Android::Volley::Request
def deliverResponse(response)
# listener.onResponse(response)
end
def parseNetworkResponse(response)
# raise "Not implemented"
end
end
# ./build/Development-19/java/com/magoosh/prep/development/GsonRequest.java:4: error: no suitable constructor found for Request(no arguments)
@zmillman
zmillman / main_activity.rb
Last active August 29, 2015 14:15
RM Android: Can't .send methods with String names
class MainActivity < Android::App::Activity
def onCreate(savedInstanceState)
super
puts self.token
# > secret
puts self.send :"token"
# > secret
puts self.send "token"
# E/dalvikvm(22221): VM aborting
# FFmpeg is a tool for converting, streaming, and playing multimedia content.
#
# The installation recipe pulls heavily from this guide: https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
#
# If you have trouble with the server hanging on "Building Debian package...", try increasing the
# instance size. I've had bad luck with m1.small and good luck with m1.large
#
# qtfaststart is a script for repositioning the Quicktime atom for mp4 streaming.
# see https://github.com/danielgtaylor/qtfaststart for more info
@zmillman
zmillman / deploy-delayed_job.rb
Last active December 14, 2015 06:19
delayed_job capistrano recipe for rubber
# Capistrano Recipes for managing delayed_job
#
# These recipes are stolen directly from delayed_job's recipes - https://github.com/collectiveidea/delayed_job/blob/master/lib/delayed/recipes.rb
#
# If you want to use command line options, for example to start multiple workers,
# define a Capistrano variable delayed_job_args:
#
# set :delayed_job_args, "-n 2"
#
# If you've got delayed_job workers running on separate servers, you can also specify