This file contains 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
require 'shellwords' | |
def tell_chrome_to(*commands) | |
tell(%Q(application "System Events" to tell application process "Google Chrome"), *commands) | |
end | |
def tell(target, *commands) | |
["tell #{target}", *commands.flatten, 'end tell'] | |
end |
This file contains 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
{ | |
"openapi": "3.0.1", | |
"info": { | |
"title": "Claims API", | |
"version": "v1", | |
"description": "This is the Claims API top level description. \n\nEdit me in /lib/tasks/open_api.rake.\n" | |
}, | |
"paths": { | |
"/api/v1/notices/claims": { | |
"post": { |
This file contains 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
C /usr | |
A /usr/include | |
A /usr/include/node | |
A /usr/include/node/node_buffer.h | |
A /usr/include/node/node_object_wrap.h | |
A /usr/include/node/uv | |
A /usr/include/node/uv/win.h | |
A /usr/include/node/uv/aix.h | |
A /usr/include/node/uv/android-ifaddrs.h | |
A /usr/include/node/uv/errno.h |
This file contains 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 'optparse' | |
options = { | |
retries: 10, | |
delay: 1 | |
} | |
parser = OptionParser.new do |opts| |
This file contains 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
class Maybe | |
attr_reader :value | |
# @returns [Maybe] | |
def self.empty | |
@empty ||= new(nil) | |
end | |
def initialize(value, &block) | |
@value = value.is_a?(Maybe) ? value.value : value |
This file contains 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
version: '2' | |
services: | |
test: | |
environment: | |
ENV_TWO: 'overridden' |
This file contains 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
class Command | |
def initialize(command, target, script, uses_bash) | |
@command, @target, @script, @uses_bash = command, target, script, uses_bash | |
end | |
def result | |
command == :exec ? exec_command : run_command | |
end | |
def exec_command |
This file contains 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
Foo | |
Bar | |
Baz | |
Bing |
This file contains 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
/var/folders/5y/csxbdjv156n4fl25975s1x4w0000gn/T/ruby-build.20160921182951.4002 ~/.rbenv/versions | |
/var/folders/5y/csxbdjv156n4fl25975s1x4w0000gn/T/ruby-build.20160921182951.4002/ruby-2.3.1 /var/folders/5y/csxbdjv156n4fl25975s1x4w0000gn/T/ruby-build.20160921182951.4002 ~/.rbenv/versions | |
checking for ruby... /usr/local/bin/ruby | |
config.guess already exists | |
config.sub already exists | |
checking build system type... x86_64-apple-darwin16.0.0 | |
checking host system type... x86_64-apple-darwin16.0.0 | |
checking target system type... x86_64-apple-darwin16.0.0 | |
checking whether the C compiler works... yes | |
checking for C compiler default output file name... a.out |
This file contains 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
def insertion_sort(collection) | |
collection.count.times do |i| | |
index = i | |
next if index.zero? | |
right_value = collection[i] | |
while index > 0 | |
index -= 1 | |
left_value = collection[index] | |
if right_value < left_value |
NewerOlder