go aws ec2 control

package main import ( “fmt” “log” “net/http” “io/ioutil” “github.com/gorilla/mux” “github.com/smartystreets/go-aws-auth” ) func stopEC2InstanceHandler(w http.ResponseWriter, req *http.Request) { vars := mux.Vars(req) w.Write([]byte(fmt.Sprintf(“stopEC2InstanceHandler: %v \n\n”, vars[“id”]))) var Action = “StopInstances” //check aws website var Version = “2016-11-15” //need to check api version from aws website //regoin need to check url from aws website. ex: ap-northeast-2 //some region no support some action apiUrl := “https://ec2.ap-northeast-2.amazonaws.com/?Action=" + Action + “&Version=” + Version + “&InstanceId.1=” + vars[“id”] client := new(http.Client) ...

2017-07-25 · 1 min · 202 words · Me

go crawler

https://codereview.stackexchange.com/questions/70263/go-go-gadget-web-crawler https://github.com/PuerkitoBio/gocrawl

2017-07-18 · 1 min · 2 words · Me

有go 全自動化模擬操作

https://github.com/go-vgo/robotgo https://github.com/go-vgo/Mingw

2017-06-24 · 1 min · 2 words · Me

hugo chang ip and bind all

hugo server –theme=hugo_theme_robust –baseURL 192.168.xxx.xxx:1313 –bind “0.0.0.0” baseURL 192.168.xxx.xxx you server ip bind for all default only localhost…….

2016-09-21 · 1 min · 18 words · Me