I hereby claim:
- I am webdevwilson on github.
- I am webdevwilson (https://keybase.io/webdevwilson) on keybase.
- I have a public key ASCQOw3sBm8okN0t_Nj-LcZdXMcDAd-ZGJHubJTgBSZdcgo
To claim this, I am signing this object:
| func main() { | |
| var port string | |
| var ok bool | |
| if port, ok = os.LookupEnv("PORT"); !ok { | |
| port = "8080" | |
| } | |
| http.Handle("/", boundary.NewRequestHandler("")) | |
| log.Fatal(http.ListenAndServe(fmt.Sprintf(":%s", port), nil)) |
| func SayHello() (interface{}, error) { | |
| msg := os.Getenv("MSG") | |
| return fmt.Sprintf("Hello from %s", msg), nil | |
| } |
| func (h *httpHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { | |
| // strip the path prefix | |
| uri := req.URL.Path[len(h.pathPrefix):] | |
| var data interface{} | |
| var err error | |
| if uri == "/" { | |
| http.Redirect(w, req, fmt.Sprintf("%s/hello", h.pathPrefix), 302) | |
| return |
| /** | |
| * List the subdirectories in a directory | |
| * @param p the path to the directory | |
| */ | |
| function *listDirectories(p: string) { | |
| return new Promise((resolve, reject) => { | |
| fs.readdir(p, (err, files) => { | |
| files.forEach(f => { | |
| fs.stat(f, (err, stats) => { | |
| if(stats.isDirectory()) |
| # Stores vault profile in .aws-vault-profile and provides useful | |
| # commands to use them | |
| # | |
| # aws-vault-get - echo the profile for this directory, searches parent directories | |
| # aws-vault-set <profile> - set the profile for the current directory | |
| # ave <command> - execute a command with the current aws profile | |
| # avl - login to the AWS console with the current profile | |
| # avr - rotate your keys | |
| AWS_VAULT_PROFILE_FILE=".aws-vault-profile" |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash -e | |
| # Set permissions: `chmod 755 ./mysql_copy.sh` | |
| # Run: `./mysql_copy.sh <databasename>` | |
| ######### CONFIGURE HERE ###################################################### | |
| # insert your source database credentials | |
| SRC_DB_HOST=localhost | |
| SRC_DB_USER=root |
| #!/bin/bash | |
| javac -d bin $(find ./src/* | grep .java) | |
| dir=$(pwd) | |
| cd bin | |
| java edu/gatech/cs6310/projectOne/ProjectOne -i ../resources/medium/student_demand_600.csv | |
| if [ $? -eq 1 ]; then | |
| echo "Relative directory failed." | |
| exit 1 | |
| fi |
| # copied from https://groups.google.com/forum/#!topic/golang-nuts/dEfqPOSccIc | |
| package main | |
| import( | |
| "crypto/rand" | |
| "crypto/tls" | |
| "io/ioutil" | |
| "log" | |
| "net" |
| # overload cd to gc git when entering a directory | |
| cd () { | |
| builtin cd "$@" | |
| if [ -d ".git" ]; then | |
| (git gc --quiet &) | |
| fi | |
| } |