-
230 g unsalted, room temperature butter
-
350 g sugar
-
8 g vanilla
-
2 room temperature eggs
-
55 g lemon juice (about 1 lemon's worth)
-
2 lemons, zested
Bootstrap up a new aws machine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yajl' | |
require 'zlib' | |
require 'hitimes' | |
metric = ::Hitimes::TimedValueMetric.new('yajl') | |
infile = ARGV.shift | |
count = 0 | |
buffer_size = 1024 * 64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case [beacon_event.data.event, open_visits.any?] | |
when [BeaconEvent::ENTERED, true] | |
# beacon sent another entered event and the visit is already registered | |
when [BeaconEvent::ENTERED, false] | |
# beacon sent entered event and the visit hasn't been registered | |
when [BeaconEvent::EXITED, true] | |
# beacon sent an exited event and the visit is registered | |
when [BeaconEvent::EXITED, false] | |
# beacon sent an exited event and the visit is not registered |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'securerandom' | |
def diceword(words) | |
key = 5.times.map { (SecureRandom.random_number(6) + 1).to_s } .join('') | |
words[key] | |
end | |
words = Hash.new.tap do |h| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Testing name lookup in C on OSX Sierra | |
* | |
* compile: cc -o name-test ./getaddrinfo.c | |
* | |
*/ | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netdb.h> | |
#include <unistd.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% env | grep GEM | |
% /opt/rubies/ruby-2.2.2/bin/gem env | |
RubyGems Environment: | |
- RUBYGEMS VERSION: 2.6.2 | |
- RUBY VERSION: 2.2.2 (2015-04-13 patchlevel 95) [x86_64-darwin15] | |
- INSTALLATION DIRECTORY: /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0 | |
- USER INSTALLATION DIRECTORY: /Users/jeremy/.gem/ruby/2.2.0 | |
- RUBY EXECUTABLE: /opt/rubies/ruby-2.2.2/bin/ruby | |
- EXECUTABLE DIRECTORY: /opt/rubies/ruby-2.2.2/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% export GEM_HOME=tmp/gem/a | |
% gem install envolve | |
Fetching: envolve-1.1.0.gem (100%) | |
Successfully installed envolve-1.1.0 | |
1 gem installed | |
% gem list -d envolve | |
*** LOCAL GEMS *** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rack' | |
gem 'grape' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'bundler/inline' | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'octokit', '~> 4.2' | |
gem 'trollop', '~> 2.1' | |
gem 'launchy', '~> 2.4' | |
gem 'netrc', '~> 0.11' |