I hereby claim:
- I am genghisjahn on github.
- I am genghisjahn (https://keybase.io/genghisjahn) on keybase.
- I have a public key whose fingerprint is 617E C2B6 541C C343 4BE5 5AEF 7C34 BAA9 9CF5 A66F
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"time" | |
"github.com/hybridgroup/gobot" | |
"github.com/hybridgroup/gobot/platforms/sphero" | |
) | |
func main() { |
func ProcessText(text string, items []TextLengthItem) string { | |
firstParts := []string{"This text is %v characters in length.", "Text is %v characters long.", "Text is %v characters in length."} | |
result_template := "%v %v" | |
textLength := len(text) + 2 | |
for _, firstPart := range firstParts { | |
for _, item := range items { | |
length_sentence := fmt.Sprintf(firstPart, item.Text) | |
if textLength+len(length_sentence) == item.Value { | |
return fmt.Sprintf(result_template, text, length_sentence) | |
} |
Memorize this stuff!!
git br | grep deeplink
returns all the branches that have deeplink
in the name.find . | grep language
finds all the files with the string language
in the name.find . -name "*.sql"
finds all the files that end with .sql
in the name.find . "*user*" | xargs cat
finds each file with user
in the title and then cats them all.find . -name "*.go" | xargs cat | wc -l
finds each file that ends with .go
and counts the total lines of code.package main | |
import ( | |
"os" | |
"github.com/go-logging" | |
) | |
//https://github.com/op/go-logging/ | |
var log = logging.MustGetLogger("main") |
boot2docker stop | |
install latest version of VBOX (currently 4.3.30) | |
install latest version of Boot2docker (currently https://github.com/boot2docker/osx-installer/releases/tag/v1.7.0) | |
boot2docker delete | |
boot2docker init | |
boot2docker start | |
boot2docker ssh 'sudo /etc/init.d/docker restart' # This line is key... |
Installed pathogen | |
Installed sensible-vim | |
Installed vim-go | |
Installed molokai color |
The hypothetical student, still a mule, would drift around for a while. He would get another kind of education quite as valuable as the one he’d abandoned, in what used to be called the "school of hard knocks." Instead of wasting money and time as a high-status mule, he would now have to get a job as a low-status mule, maybe as a mechanic. Actually his real status would go up. He would be making a contribution for a change. Maybe that’s what he would do for the rest of his life. Maybe he’d found his level. But don’t count on it.
In time...six months; five years, perhaps...a change could easily begin to take place. He would become less and less satisfied with a kind of dumb, day-to-day shopwork. His creative intelligence, stifled by too much theory and too many grades in college, would now become reawakened by the boredom of the shop. Thousands of hours of frustrating mechanical problems would have made him more interested in machine design. He would like to design machinery himself. He’d think he could do a
package main | |
import ( | |
"fmt" | |
"strconv" | |
) | |
func main() { | |
a := "this is a test" | |
b := "wokka wokka!!!" |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"sync" | |
"time" | |
) | |
func main() { |