Skip to content

Instantly share code, notes, and snippets.

View tsenart's full-sized avatar
🎯
Focusing

Tomás Senart tsenart

🎯
Focusing
View GitHub Profile
diff --git a/log/value.go b/log/value.go
index f2c55b7..4351586 100644
--- a/log/value.go
+++ b/log/value.go
@@ -18,6 +18,12 @@ type Valuer interface {
Value() Value
}
+// ValuerFunc is an adapter func type that implements the Valuer interface.
+type ValuerFunc func() Value
diff --git a/log/value.go b/log/value.go
index f2c55b7..ba622da 100644
--- a/log/value.go
+++ b/log/value.go
@@ -11,12 +11,10 @@ type Value interface{}
// A Valuer generates a log value. When passed to With, it represents a
// dynamic value which is re-evaluated with each log event.
-type Valuer interface {
- // Value returns a log Value instead of an interface{} to avoid
λ ~/go/src/github.com/mesosphere/RENDLER/go/src/github.com/mesosphere/rendler/ master golint .
edge.go:7:6: exported type Edge should have comment or be unexported
export_dot.go:16:1: exported function WriteDOTFile should have comment or be unexported
export_dot.go:38:3: don't use underscores in Go names; var hash_bytes should be hashBytes
export_dot.go:58:3: don't use underscores in Go names; var from_hash_bytes should be fromHashBytes
export_dot.go:59:3: don't use underscores in Go names; var from_hash should be fromHash
export_dot.go:62:3: don't use underscores in Go names; var to_hash_bytes should be toHashBytes
export_dot.go:63:3: don't use underscores in Go names; var to_hash should be toHash
results.go:8:1: comment on exported type CrawlResult should be of the form "CrawlResult ..." (with optional leading article)
results.go:15:1: exported method CrawlResult.FromJson should have comment or be unexported
tomas:~/code/refinerycms [git:master]
⌦ git show
commit 4aed32106abcda81ab5d775b98293824075eb516
Merge: 88e9ad1 1c60c26
Author: Tomás Senart <tsenart@me.com>
Date: Wed Sep 1 01:36:36 2010 +0100
Merge remote branch 'resolve/master'
diff --cc bin/refinerycms
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
$ cd ~/Library/Application\ Support/Google/Chrome/
$ cat Local\ State| grep client_id
"client_id": "046C3827-XXXX-XXXX-XXXX-F1111E0B8F91",
"client_id_timestamp": "1263063003",
$
{"html": "<br></object>"}
@tsenart
tsenart / gist:902681
Created April 4, 2011 23:14
Elegance analysis
document.body.addEventListener('keydown', function(e) {
([37, 39].indexOf(e.keyCode) > -1) && pres[{37:'prev',39:'next'}[e.keyCode]]();
});
// VERSUS
document.body.addEventListener('keydown', function(e) {
switch(e.keyCode) {
case 37:
pres.prev();
@tsenart
tsenart / LICENSE.txt
Created May 19, 2011 18:11 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
Copyright (c) 2011 YOUR_NAME_HERE, YOUR_URL_HERE
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
rm -rf ~/.vim*
rm -rf ~/.gvim*
brew update
brew uninstall ack
brew install ack
sudo pip uninstall pep8
sudo pip install pep8