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
# command to export the profiling info as an svg graph | |
go tool pprof -svg name_of_executable_program_file /Users/g.laor/profile.dev.pg.gz > profile.dev.svg | |
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
func connectionString() string { | |
conn := fmt.Sprintf("%s:%s@(%s:3306)/%s?charset=utf8", config["db_user"], config["db_pass"], config["db_host"], config["db_name"]) | |
return conn | |
} | |
func authenticateUser(username string, password string) string { | |
db, err := sql.Open("mysql", fmt.Sprintf("%s", connectionString())) | |
checkError(err) |
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
Create 3 files. | |
/build.sh ---> remember to chmod +x this file | |
go get github.com/gorilla/mux | |
go build -o bin/application *.go | |
/Buildfile | |
make: ./build.sh | |
/Procfile |
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 ( | |
"bytes" | |
"encoding/hex" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" |
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
Install python 3 | |
create a virtualenv and then | |
pip install selenium | |
then install chrome driver: | |
brew install chromedriver | |
to test, run this script - notice the location of the chrome driver |
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 pyenv | |
pyenv install 3.5.0 | |
virtualenv -p /Users/Guy/.pyenv/versions/3.5.0/bin/python3.5 mypy3 | |
. ./mypy3/bin/activate | |
python --version | |
# installing tensor flow | |
pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py3-none-any.whl |
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
render: function() { | |
var cleft = 100; | |
var ctop = 100; | |
var ctrans = 'translate('+cleft+'px, '+ctop+'px)'; | |
var css = { | |
transform: ctrans | |
} | |
return ( |