Keybase proof
I hereby claim:
- I am fourseven on github.
- I am four_seven (https://keybase.io/four_seven) on keybase.
- I have a public key ASB8x_osf4BNH2Mkm-m_uaAl5xP7LUDeXx9UKQJSsjwhPQo
To claim this, I am signing this object:
tap "heroku/brew" | |
tap "homebrew/apache" | |
tap "homebrew/science" | |
tap "homebrew/core" | |
tap "homebrew/php" | |
tap "homebrew/bundle" | |
tap "homebrew/services" | |
tap "caskroom/fonts" | |
tap "caskroom/versions" | |
tap "caskroom/cask" |
#include <Arduino.h> | |
#include <Stream.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WiFiMulti.h> | |
// DHT22 - https://learn.adafruit.com/dht, https://github.com/adafruit/DHT-sensor-library | |
#include "DHT.h" | |
//AWS | |
#include "sha256.h" |
I hereby claim:
To claim this, I am signing this object:
Preface:
It's useful to know the memory characteristics of different Ruby versions.
2.0 Uses less memory, but is slower - GC blocks while running
2.1 Generational GC - more memory, but faster GC meaning faster apps (split: old / young heap spaces)
2.2 Introduces incremental GC - marks in steps, reducing stop-the-world time, making OOB GC redundant.
Before | |
Hash Semi Join (cost=1374.03..1852.31 rows=59 width=62) (actual time=22.141..23.774 rows=1 loops=1) | |
After | |
Nested Loop Anti Join (cost=19.22..235.45 rows=33 width=62) (actual time=0.046..0.047 rows=1 loops=1) |
$<.each{|l|i=l.to_i | |
o="" | |
o="Fizz" if i%3==0 | |
o+="Buzz" if i%5==0 | |
puts o==""?l:o} |
def b i=1,w=nil | |
"#{i} bottle#{:s if i>1} of beer#{" on the wall" if w}" | |
end | |
puts *99.downto(2).map {|n| "#{b n,1}, #{b n}.\nTake one down and pass it around, #{b n-1,1}.\n\n"} | |
puts "#{b 1,1}, #{b}.\nGo to the store and buy some more, #{b 99,1}.\n\n" |
I have: | |
def self.find_bot_for_user_from_token(current_user, oauth_token) | |
end | |
Using named params it would be (requires 2.1 to not have defaults): | |
def self.find_bot(for_user:, from_token:) | |
puts for_user | |
end | |
vs |
class MailerContact | |
def initialize(first_name, last_name) | |
@first_name, @last_name = first_name, last_name | |
end | |
def full_name | |
"#{@first_name} #{@last_name}" | |
end | |
end |
/** | |
* border-box | |
*/ | |
* {box-sizing: border-box;} | |
.non-border-box { | |
box-sizing: content-box; | |
} | |
div { | |
border: 2px solid blue; |