- http://zacstewart.com/2015/05/14/using-json-web-tokens-to-authenticate-javascript-front-ends-on-rails.html
- http://blog.confluent.io/2015/05/27/using-logs-to-build-a-solid-data-infrastructure-or-why-dual-writes-are-a-bad-idea/
- https://www.youtube.com/watch?v=MzYZhh6gpI0
- http://surtdecasa.cat/ebre/entorn/les-10-millors-excursions-fer-la-primavera-les-terres-de-l-ebre
- http://learnxinyminutes.com/docs/go/
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
# | |
# Count the number of positive integers less | |
# than N that does not contains digit 4. | |
# | |
# Source: http://www.careercup.com/question?id=4752301805797376 | |
class PositiveNonFour | |
def count_integers_non_four_less_than(max, strategy = :brute_force) | |
@filter = 4 |
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
<?php | |
trait Singleton | |
{ | |
private static $_instance; | |
private function __construct(){} | |
public function __clone() | |
{ | |
throw new Exception('This object cannot be cloned!'); |
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 | |
# myapp daemon | |
# chkconfig: 345 20 80 | |
# description: myapp daemon | |
# processname: myapp | |
DAEMON_PATH="/home/wes/Development/projects/myapp" | |
DAEMON=myapp | |
DAEMONOPTS="-my opts" |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
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
nc, _ := nats.Connect(nats.DefaultURL) | |
body := []byte(`{"status":"verification_pending", "verification_done"}`) | |
msg, err := nc.Request("workflow.get.next", body, 10*time.Millisecond) | |
nc.Close(); |
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
{ | |
"arcs": [ | |
{ | |
"from": "initialized", | |
"to": "verification_pending", | |
"when": "verify" | |
}, | |
{ | |
"from": "verification_pending", | |
"to": "to_transcode", |
I hereby claim:
- I am adriacidre on github.
- I am kumulo (https://keybase.io/kumulo) on keybase.
- I have a public key ASBM169TXG0MNhX3RpK19w_OV_RrxIHIE7Rf3CCnfC-qbQo
To claim this, I am signing this object:
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
type Cart struct { | |
Account int `json:"account_number"` | |
Fruits []string `json:"fruits"` | |
} | |
cart := &Cart{ | |
Account: 1, | |
Fruits: []string{"apple", "peach", "pear"}} | |
} |
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
fmt.Printf("%+v\n", cart) | |
// &{Account:1 Fruits:[apple peach pear]} |
OlderNewer