- 30 grams of coffee
- 250 grams of hot water
- 250 grams of ice
- Your favorite pour over device (Chemex, Hario V60, Beehouse Dripper, Kalita Wave, etc.)
- A container to brew into (mug, Chemex, mason jar, serving carafe, etc.)
- A filter
- A scale
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 StoredProcedureService | |
def self.instance | |
@instance ||= StoredProcedureService.new | |
end | |
def execute(name, *args) | |
results = [] | |
begin | |
connection.execute("CALL #{name}(#{args.join(',')})").each(as: :hash, symbolize_keys: true) do |row| |
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
#!/bin/bash | |
# Fill Disk with random data for testing | |
myname=`basename $0` | |
usage() { | |
echo "Usage: $myname [-d dircount] [-f filecount] [-b maxblockcount] [-s blocksize] [-v] [-q] [-h]" | |
exit 0 | |
} | |
help() { |
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
<link href="http://code.divshot.com/geo-bootstrap/swatch/bootstrap.min.css" rel="stylesheet"/> | |
<style> | |
body{ | |
background: white !important; | |
} | |
h1{ | |
text-align: center; | |
margin: 50px; | |
} |
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 tar(path) | |
base_path = path.split("/")[0..-2].join("/") | |
folder = path.split("/")[-1] | |
if File.exist?(".gitignore") | |
ok = system("/usr/bin/tar -C \"#{base_path}\" --exclude='.git' --exclude-from=.gitignore -cvzf \"#{tempfile}\" \"#{folder}\"") | |
else | |
ok = system("/usr/bin/tar -C \"#{base_path}\" -cvzf \"#{tempfile}\" \"#{folder}\"") | |
end | |
unless ok | |
raise StandardError, $? |
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
local_var.method_with_hash_and_block( | |
mandatory_param, | |
option_1: a, | |
option_2: blabla, | |
option_3: blablablablablabla, | |
option_4: bblablablablablablablabla, | |
option_5: bblablablabla, | |
) do |v| | |
d = v.bla | |
e = v.bla |
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 | |
issue= ARGV.shift | |
current_branch = `git rev-parse --abbrev-ref HEAD` | |
default_branch = ENV.fetch("DEFAULT_BRANCH", "master") | |
origin_url = `git config --get remote.origin.url` | |
if origin_url.start_with?("git") | |
repo = origin_url.split(':')[1].split('.')[0] | |
else | |
repo = origin_url.sub('https://github.com/', '').split('.')[0] |
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 'transmission_api' | |
require 'pp' | |
class TorrentCli | |
def initialize(conf_file = "#{ENV['HOME']}/.torrent.conf") | |
@conf_file = conf_file | |
unless File.exist?(conf_file) | |
$stderr.puts "Config file does not exists. Default is : ~/.torrent.conf" | |
exit 1 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>{{ page.title }}</title> | |
<meta name="viewport" content="width=device-width"> | |
<!-- syntax highlighting CSS --> | |
<link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700' rel='stylesheet' type='text/css'> |
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 | |
def padded_tweet(message) | |
if message.size >= 140 | |
return message[0..139] | |
end | |
if %w{. ! ? …}.include? message[-1] | |
return message.ljust(140, message[-1]) | |
end | |
return message.ljust(140, '!') |
NewerOlder