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" | |
"strings" | |
) | |
func main() { | |
str := " This string has many many spaces that need to be replaced " |
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 ( | |
"encoding/csv" | |
"fmt" | |
"os" | |
) | |
func main() { | |
csvfile, err := os.Create("output.csv") |
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" | |
) | |
type SayHelloIntFace interface { | |
SayHello() | |
} |
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" | |
"html/template" | |
"os" | |
) | |
func main() { | |
t := template.New("HELLO") | |
var templates = template.Must(t.ParseFiles("defaultTemplate.html")) | |
data := map[string]interface{}{ |
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
#!/bin/bash | |
# The binary is most likely to have the current directory name | |
PROCESS=${PWD##*/} | |
# We kill the previous process | |
killall ${PROCESS} | |
# We launch the process | |
go build |
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
#!/bin/bash | |
# PHP 7 | |
# Dependencies | |
apt-get update | |
apt-get install -y \ | |
git-core \ | |
autoconf \ | |
bison \ |
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
upstream ghost_upstream { | |
server 127.0.0.1:2368; | |
keepalive 64; | |
} | |
proxy_cache_path /var/run/cache levels=1:2 keys_zone=STATIC:75m inactive=24h max_size=512m; | |
server { | |
server_name domain.com; | |
add_header X-Cache $upstream_cache_status; |
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
source /etc/profile.d/rvm.sh |
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
server { | |
listen 8001; | |
server_name dev.employer.vietnamworks.com; | |
#charset utf-8; | |
#access_log /var/log/nginx/log/host.access.log; | |
error_log /var/log/nginx/error.log; | |
root /home/khoa/Projects/employerdashboard/web; | |
location / { | |
try_files $uri /app_dev.php$is_args$args; |
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
#Install mcrypt extension php | |
brew install autoconf mcrypt | |
#download source php | |
cd php/ext/mcrypt | |
/usr/local/Cellar/php55/5.5.30/bin/phpize | |
./configure | |
make | |
sudo make install | |
OlderNewer