php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"\nphp -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
vim .zshrc
# https://laravel.com/docs/5.7
composer global require laravel/installer
vim .zshrc
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
brew upgrade python3 | |
pip3 install --upgrade pip setuptools wheel | |
pip3 install --upgrade virtualenv | |
virtualenv --system-site-packages -p python3 tensorflow | |
cd tensorflow | |
source ./bin/activate | |
# 後: https://www.tensorflow.org/install/install_mac | |
pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.10.1-py3-none-any.whl |
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
// https://talks.golang.org/2012/concurrency.slide#36 | |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
type Message struct { |
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
// from https://yar999.gitbooks.io/gopl-zh/content/ch8/ch8-04.html | |
// gopl.io/ch8/pipeline3 | |
package main | |
import ( | |
"fmt" | |
//"sync" | |
) |
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
package main | |
import "fmt" | |
func main() { | |
slice := []int{1} | |
fmt.Printf("%v , len: %v , cap: %v\n", &slice[0], len(slice), cap(slice)) |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
func main() { | |
vars := []interface{}{"1", "2", "3", "4", "5"} | |
fmt.Println(vars) |
git:(master) git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short | grep ^\* | grep 'Merge pull request'
git diff b32e180d^ 73241c26 --name-only