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
| brew install python --framework | |
| mkdir ~/Library/Frameworks/ | |
| cd ~/Library/Frameworks/ | |
| ln -s /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework . | |
| brew install -v https://gist.github.com/satyrius/1635076/raw/vim.rb |
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
| cd $HOME | |
| git clone git@github.com:satyrius/dotfiles.git .dotfiles | |
| cd .dotfiles | |
| for f in $(ls); do df="../.$f"; rm $df; ln -s "$(pwd)/$f" $df; done; | |
| cd $HOME | |
| rm .README.dm |
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 main | |
| import ( | |
| "fmt" | |
| "math" | |
| ) | |
| func Sqrt(x float64) float64 { | |
| z := 1.0 | |
| for i := 1; i <= 10; i++ { |
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 main | |
| import "code.google.com/p/go-tour/pic" | |
| func Pic(dx, dy int) [][]uint8 { | |
| res := make([][]uint8, dy) | |
| for y := range res { | |
| res[y] = make([]uint8, dx) | |
| for x := range res[y] { | |
| res[y][x] = uint8((x + y) /2) |
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 main | |
| import ( | |
| "code.google.com/p/go-tour/wc" | |
| "strings" | |
| ) | |
| func WordCount(s string) map[string]int { | |
| res := make(map[string]int) | |
| for _, w := range strings.Fields(s) { |
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 main | |
| import "fmt" | |
| // fibonacci is a function that returns | |
| // a function that returns an int. | |
| func fibonacci() func() int { | |
| var a, b int | |
| return func() int { | |
| a, b = b, a + b |
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 main | |
| import ( | |
| "fmt" | |
| "math" | |
| "math/cmplx" | |
| ) | |
| func Cbrt(x complex128) complex128 { | |
| z := complex128(1) |
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 main | |
| import ( | |
| "fmt" | |
| ) | |
| type ErrNegativeSqrt float64 | |
| func (e ErrNegativeSqrt) Error() string { | |
| return fmt.Sprintf("cannot Sqrt negative number: %v", float64(e)) |
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 main | |
| import ( | |
| "code.google.com/p/go-tour/pic" | |
| "image" | |
| "image/color" | |
| ) | |
| type Image struct{ | |
| Width, Height int |
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
| #!/bin/bash -e | |
| docker ps -a -q | xargs docker rm | |
| docker images | grep '^<none>' | awk '{print $3}' | xargs docker rmi |
OlderNewer