Mix.install([
{:kino_db, "~> 0.2.10"},
{:postgrex, ">= 0.0.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
main.dSYM | |
main |
- 80 grams (about 1 cup whole beans) coffee
- 2 cups room temperature water
Makes about 3 iced-coffee
- Grind beans coarsely, I used one setting below the coarsest. Mix water and coffee into a container, cover, and let sit for 10 hours.
- After, filter the brewed coffee as best you can. The result will be strong, too strong to drink. I suggest diluting with 0.5:1.0 water to brew.
- Pour over ice, or, heat.
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
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
defmodule Simple do | |
@doc ~S""" | |
# Example | |
iex> Simple.toot() | |
:toooot | |
""" | |
def toot() do |
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 'pp' | |
class Object | |
def mutate | |
Mutagen.new(self) | |
end | |
end | |
class Mutagen < BasicObject | |
def initialize(collection) |
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
{ | |
"query": { | |
"filtered": { | |
"query": { | |
"bool": { | |
"should": [ | |
{ | |
"query_string": { | |
"query": "kibana.dev" | |
} |
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
# the nice thing about this improved yz api is that it's not released yet! i can | |
# do anything, i'm the master of time! | |
# this is how we search pretty much anything | |
query = Riak::Search::Query.new client, index, 'cool search term' | |
results = query.results # actually hits riak, gives us a ResultsCollection | |
# existing robject functionality | |
robject_md = results.docs[0] | |
# equivalent |
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 Cell | |
def initialize | |
become_dead | |
end | |
def eigenclass | |
class << self | |
self | |
end | |
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
def puts(crap); super("stop using puts"); end #dave | |
def puts(s); super; super("WAT"); (s=s.to_s).reverse!; end # hiro | |
puts greeting = "Hello Ruby DCamp! It is %s" % Time.now # hiro | |
puts (words = File.read('/usr/share/dict/words').split).length #bryce | |
puts (butt_words = words.select {|w| w =~ /butt/}).length #bryce | |
words = words.select {|w| w =~ /ity$/ } # Jason | |
words = words.map{|w| w.tr("aeiou", ('a'..'z').to_a.sample(5).join)} # max | |
puts sentence = (5.times.map{words.sample.reverse}.join " LOL ") # Joshsz | |
puts upsentence = sentence.upcase # max | |
new_things = `ls /tmp`; puts new_things # Luqi |
NewerOlder