Skip to content

Instantly share code, notes, and snippets.

@weiser
weiser / keybase.md
Last active July 29, 2019 15:40
keybase.md

Keybase proof

I hereby claim:

  • I am weiser on github.
  • I am weiser (https://keybase.io/weiser) on keybase.
  • I have a public key whose fingerprint is 4BC8 C4E9 FADA 4513 C0D3 645D 357D 818A 5A4D 32E5

To claim this, I am signing this object:

@weiser
weiser / peer-1-1-questions.md
Created December 19, 2018 18:06
A list of peer 1-1 questions

Summary

As a remote employee, I understand that there is a potential for in-office employees to misunderstand my intent as written communication has no body language or nuance of how a thing is verbally said.

With that said, the following questions are aimed at helping remote/in-office peers smooth out any misunderstandings between them so that they can work effectively together with a goal of seeking good will towards each other and assuming good intent from each other. It requires each participant to be clear and honest during the conversation.

Questions

  • Have I communicated anything that rubbed you the wrong way? If so:
    • what was it?
  • how did it make you feel?
@weiser
weiser / litcoffee-rubric
Created April 20, 2017 15:50
The rubric we're using to determine if we should switch to litcoffee
1. How will it help devs fresh to the project to ramp up quickly?
2. How painful is it to keep the documentation up to date?
3. How much friction is added to writing and reading existing source code?

A proposed code of conduct for code reviews. I think it would help us maintain our team culture when our team grows so that new team members know what we expect and it can also serve as a reminder to us how we want to operate.

  1. Show appreciation that someone took time/energy to do submit the CR.
  2. Keep criticism constructive.
  3. No ad hominems.
  4. When you disagree, view it as a teaching moment. Seek to understand rather than only prove yourself right. You might be wrong.
  5. View constructive criticism as a benefit. You get to level up your skills!
@weiser
weiser / configure_base.sh
Last active October 8, 2015 15:28
Configure a vanilla Ubuntu box for development with ChefDK+virtualbox+vim(with janus)+ruby 2.1
# download prereqs
sudo apt-get install -y -q curl zsh git screen vim ack-grep exuberant-ctags
# get ruby
sudo apt-get install -y -q software-properties-common
sudo apt-add-repository -y ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install -y -q ruby2.1 ruby2.1-dev
# install virtualbox
@weiser
weiser / gist:50707183f988ca0e3465
Created February 17, 2015 22:06
Running a Hadoop MR job on a remote cluster
vagrant@dev-all-ubuntu-1204:/granary$ HADOOP_USER_NAME=cloudera hadoop jar /usr/lib/hbase/hbase-0.94.15-cdh4.7.0-security.jar importtsv -Dimporttsv.separator=, -Dimporttsv.bulk.output=output -Dimporttsv.columns=HBASE_ROW_KEY,f:count wordcount /tmp/word_count.csv
15/02/17 21:48:03 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.5-cdh4.7.0--1, built on 05/28/2014 16:33 GMT
15/02/17 21:48:03 INFO zookeeper.ZooKeeper: Client environment:host.name=dev-all-ubuntu-1204.vagrantup.com
15/02/17 21:48:03 INFO zookeeper.ZooKeeper: Client environment:java.version=1.7.0_75
15/02/17 21:48:03 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation
15/02/17 21:48:03 INFO zookeeper.ZooKeeper: Client environment:java.home=/usr/lib/jvm/java-7-openjdk-amd64/jre
15/02/17 21:48:03 INFO zookeeper.ZooKeeper: Client environment:java.class.path=/etc/hadoop/conf:/usr/lib/hadoop/lib/jets3t-0.6.1.jar:/usr/lib/hadoop/lib/jetty-util-6.1.26.cloudera.2.jar:/usr/lib/hadoop/lib/commons-beanutils-core-1.8.0

Keybase proof

I hereby claim:

  • I am davidann on github.
  • I am weiser (https://keybase.io/weiser) on keybase.
  • I have a public key whose fingerprint is 7A73 098D F81F 7A06 10F1 FB6C F763 C45E 9E82 0B43

To claim this, I am signing this object:

From 3beb93369a5557823cffb80494ed43434f4df20d Mon Sep 17 00:00:00 2001
From: David Weiser <davidann@moz.com>
Date: Tue, 12 Aug 2014 10:04:41 -0700
Subject: [PATCH] Use Bigtop to detect $JAVA_HOME
`service` clears most environment variables (see `man service`) so $JAVA_HOME is not set in
kiji-rest.initd. And, because $JAVA_HOME isn't set, I can't run this program via `service`.
This sets $JAVA_HOME if Bigtop is present.
---
@weiser
weiser / cipher.rb
Last active August 29, 2015 13:56
a program to decipher a cipher text given to me by Brandon and Andrew!
#!/usr/bin/ruby
CIPHER_KEYS = Hash[*%w[Y L I V F S G T U H O B E R N A A N Q D B O J W R E C P P C V I T G S F Z M L Y H U W J 8 3 6 1 M Z 3 8 4 9 9 4]]
CIPHER_TEXT = ARGV[0] ? File.open(ARGV[0], 'r').read : ""
puts
puts "original cipher text: ", CIPHER_TEXT
puts
@weiser
weiser / url_paths_are_not_decoded_in_the_request.rb
Created January 3, 2014 19:31
This gist shows that rack is not decoding url-encoded paths
# my_app.rb
require 'sinatra/base' #at version a570335d99619e5ac00dc32825201e252895d613
class MyApp < Sinatra::Base
get '/:e/:l/:q/:d' do
puts "params are: #{[:e, :l, :q, :d].map{|p| params[p]}.join(' ')}"
end
get '/*.*' do