Skip to content

Instantly share code, notes, and snippets.

View dulao5's full-sized avatar

Du Zhigang (ト シゴウ) dulao5

View GitHub Profile
@dulao5
dulao5 / 00.install.md
Last active February 15, 2019 09:01
laravel
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
@dulao5
dulao5 / 01.md
Last active January 25, 2019 10:51
kubernetes basic Tutorials
@dulao5
dulao5 / 00.learn Architectural.md
Last active November 20, 2020 01:10
Fielding, Roy Thomas. Architectural Styles and the Design of Network-based Software Architectures. Doctoral dissertation, University of California, Irvine, 2000.

基本概念

image

2.2 評価

評価 image 追加スタイル image

@dulao5
dulao5 / 1.sharemem.go
Last active September 7, 2018 03:41
golang-sharemem
// https://golang.org/doc/codewalk/sharemem/
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"log"
@dulao5
dulao5 / install.sh
Last active September 6, 2018 13:18
Macos : python3 + virtualenv + tensorflow
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
@dulao5
dulao5 / concurrency.go
Last active September 2, 2018 06:58
golang concurrency exercise
// https://talks.golang.org/2012/concurrency.slide#36
package main
import (
"fmt"
"math/rand"
"time"
)
type Message struct {
// from https://yar999.gitbooks.io/gopl-zh/content/ch8/ch8-04.html
// gopl.io/ch8/pipeline3
package main
import (
"fmt"
//"sync"
)
@dulao5
dulao5 / slice-append-cap.go
Created August 20, 2018 02:39
golang: slice append and cap
package main
import "fmt"
func main() {
slice := []int{1}
fmt.Printf("%v , len: %v , cap: %v\n", &slice[0], len(slice), cap(slice))
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