-
Your job won’t take care of you when you are sick. Your friends and family will.
-
If a relationship has to be a secret, you shouldn’t be in it.
-
Burn the candles, use the nice sheets, wear the fancy lingerie. Don’t save it for a special occasion. Today is special.
-
Frame every so-called disaster with these words, ‘In five years, will this matter?’
-
Don’t take yourself so seriously. No one else does.
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 "benchmark/ips" | |
arr = [1.0, 2.0, 3.0] | |
h = { foo: 1, bar: 2, baz: 3 } | |
class Double | |
def to_proc |
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
defmodule Expng do | |
defstruct [:width, :height, :bit_depth, :color_type, :compression, :filter, :interlace, :chunks] | |
def png_parse(<< | |
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, | |
_length :: size(32), | |
"IHDR", | |
width :: size(32), | |
height :: size(32), |
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
package sri | |
import ( | |
"crypto/sha256" | |
"encoding/base64" | |
"fmt" | |
"io/ioutil" | |
) | |
func Generate256(file string) (string, error) { |

If only cherry picking the odd commit can do so directly using following:
git checkout master
git cherry-pick 62ecb3
The new commit 62ecb3 is applied to the master branch as a new commit through merge. Any conflicts has to be resolved.
For a range of commits, rebase is a better option.
http://alphahydrae.com/2013/03/conditional-get-with-rails/
when we have an ajax request in jquery with cache set to false, it appends a timestamp as a param to the
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
require 'uri' | |
require 'net/protocol' | |
require 'byebug' | |
class Request | |
VERBS = { | |
get: 'GET' | |
} |