Tristan Sloughter tsloughter

View gist:7937857
1 2 3 4 5 6 7 8 9 10
Erlang R17A (erts-5.11) [source-458e302] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
 
Eshell V5.11 (abort with ^G)
1> T = [{attributes,[[{id,age,1.50000},{mode,explicit},
1> {typename,"INTEGER"}], [{id,cho},{mode,explicit},{typename,'Cho'}]]},
1> {typename,'Person'},{tag,{'PRIVATE',3}},{mode,implicit}].
[{attributes,[[{id,age,1.5},
{mode,explicit},
{typename,"INTEGER"}],
[{id,cho},{mode,explicit},{typename,'Cho'}]]},
View gist:7937659
1 2 3 4 5 6 7 8 9
$(DEPS_PLT):
@echo Building local erts plt at $(DEPS_PLT)
@echo
dialyzer --output_plt $(DEPS_PLT) --build_plt \
--apps erts kernel stdlib -r deps
 
dialyzer: $(DEPS_PLT)
dialyzer --fullpath --plt $(DEPS_PLT) \
-Wrace_conditions -r ./ebin | fgrep -v -f ./dialyzer.ignore-warnings
View gist:7556745
1 2 3 4 5 6 7 8 9
l, err := redis.Values(rc.Do("LRANGE", key, 0, -1))
if err != nil {
break
}
 
for _, v := range l {
val, _ := redis.Int64(v, nil)
// ... do something with val ...
}
View gist:7515912
1 2 3 4 5 6 7 8 9 10
import Test.HUnit
 
type Rating = Double
type RatingDeviation = Double
type Opponent = (Rating, RatingDeviation, Double)
type Opponents = [Opponent]
 
data Config = Config RatingDeviation Double Double
 
epsilon = 0.000001
View gist:7340704
1 2 3 4 5 6 7 8 9 10
package main
 
import "fmt"
 
func main() {
var i int
c := make(chan int)
fmt.Scan(&i)
 
go func() {
View gist:7244156
1 2 3 4 5 6 7 8 9
events.js:72
throw er; // Unhandled 'error' event
^
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
at RedisClient.on_error (/home/tristan/Devel/derby-examples/node_modules/redis/index.js:189:24)
at Socket.<anonymous> (/home/tristan/Devel/derby-examples/node_modules/redis/index.js:95:14)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:441:14
at process._tickCallback (node.js:415:13)
View gist:7171632
1 2 3 4 5 6 7 8 9 10
> T = jsx:decode(<<"{
\"coordinates\": null,
\"created_at\": \"Sat Sep 10 22:23:38 +0000 2011\",
\"truncated\": false,
\"favorited\": false,
\"id_str\": \"112652479837110273\",
\"entities\": {
\"urls\": [{
\"expanded_url\": \"http://instagr.am/p/MuW67/\",
\"url\": \"http://t.co/6J2EgYM\",
View gist:7128407
1 2 3 4 5 6 7 8 9 10
zero(0) -> true;
zero(_X) -> false.
 
def zero?(0) do
true
end
 
def zero?(x) when is_number(x) do
false
end
View gist:6922490
1 2 3 4 5 6 7 8 9 10
package main
 
import (
"fmt"
"math/rand"
"time"
)
 
func main() {
rand.Seed(time.Now().UnixNano())
View gist:6902256
1 2 3 4 5 6 7 8 9 10
(defun smarter-move-beginning-of-line (arg)
"Move point back to indentation of beginning of line.
 
Move point to the first non-whitespace character on this line.
If point is already there, move to the beginning of the line.
Effectively toggle between the first non-whitespace character and
the beginning of the line.
 
If ARG is not nil or 1, move forward ARG - 1 lines first. If
point reaches the beginning or end of the buffer, stop there."
Something went wrong with that request. Please try again.