Skip to content

Instantly share code, notes, and snippets.

View mwerner's full-sized avatar

Matthew Werner mwerner

  • Oakland, CA
View GitHub Profile
~/code/sync-engine$ docker build -t sync-engine:1 .
Sending build context to Docker daemon 3.266 MB
Step 0 : FROM debian:wheezy
wheezy: Pulling from library/debian
b1d080d9151f: Pull complete
59a090c1706e: Pull complete
library/debian:wheezy: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:2986b2d73ce94f7f2065785cce74972506da22d49f0a1cd18662f553fbd09708
Status: Downloaded newer image for debian:wheezy
---> 59a090c1706e
@mwerner
mwerner / charge
Created November 2, 2015 20:06
script to show battery charge in your terminal
#!/usr/bin/env ruby
class Charge
attr_reader :state, :status
def initialize
@state, @status = `pmset -g batt`.split("\n")
end
def time_remaining
@time_remaining ||= begin
amount = status.match(/(\d+:\d+)/)[1]
@mwerner
mwerner / keybase.md
Created June 21, 2016 18:57
KeybaseIO

Keybase proof

I hereby claim:

  • I am mwerner on github.
  • I am mwerner (https://keybase.io/mwerner) on keybase.
  • I have a public key whose fingerprint is CE0B 68BD B57B E8BA C59C ECFF 3206 4AF5 4CF3 EC09

To claim this, I am signing this object:

@mwerner
mwerner / bart.rb
Last active November 17, 2016 00:56
Bart Realtime CLI
#!/usr/bin/env ruby
# $ bart
# Usage:
# bart stations #=> list all stations with abbreviations
# bart ORIG[:DEST[:DEST]] #=> show estimates for up to three origin stations
# Example:
# $ bart POWL:PITT:RICH:PHIL RICH:MLBR
# POWL=>PITT Pittsburg/Bay Point 10 min, 25 min, 40 min

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql
@mwerner
mwerner / app_watcher.lua
Created November 1, 2017 20:11
Hammerspoon scripts
function applicationWatcher(appName, eventType, appObject)
if (eventType == hs.application.watcher.activated) then
if (appName == "Finder") then
-- Bring all Finder windows forward when one gets activated
appObject:selectMenuItem({"Window", "Bring All to Front"})
end
end
end
local appWatcher = hs.application.watcher.new(applicationWatcher)
@mwerner
mwerner / README.md
Last active June 14, 2022 19:44
Kangaroo Word Finder

Kangaroo Word Finder

This application looks through a word list and compares all other words in the list to find which words are found in other words

Kangaroo Word: A word that contains its synonym within it (ex: rambunctious & raucous: RAmbUnCtiOUS)

Joey Word: A word that is a synonym with another word it’s found within

Requirements to run:

  • Your wordlist kept at ./words.txt