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
echo "Enter the project name" | |
read -e NAME | |
echo "Enter name of dummy directory" | |
read -e DUMMY | |
mkdir $NAME | |
cd $NAME | |
mkdir lib |
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
echo "Enter the project name" | |
read -e NAME | |
mkdir $NAME | |
cd $NAME | |
mkdir css | |
touch css/index_style.css | |
mkdir js | |
touch js/index.js |
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
import os | |
import os.path | |
d='.' | |
dirs = [os.path.join(d,o) for o in os.listdir(d) if os.path.isdir(os.path.join(d,o))] | |
dir_sanitized = [] | |
for dir in dirs: | |
dir_sanitized.append(dir.split('/')[1]) | |
dirmap = open('dirmap.js','w') | |
dirmap.write("var directories=["); |
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
<html> | |
<head> | |
<title>My first Three.js app</title> | |
<style> | |
.list-item { | |
font-size: 1.2em; | |
color: black; | |
} | |
.completed { |
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
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
export MONGO_URL="mongodb://localhost/baybank" | |
source ~/.iterm2_shell_integration.`basename $SHELL` | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" |
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
// After importing "github.com/gojektech/heimdall" | |
// Create a new hystrix configuration, and input the command name, along with other required options | |
hystrixConfig := heimdall.NewHystrixConfig("downstream_get_request", heimdall.HystrixCommandConfig{ | |
ErrorPercentThreshold : 20, | |
MaxConcurrentRequests: 30, | |
Timeout: 1000, | |
SleepWindow: 1500 | |
}) | |
// Create a new hystrix-wrapped HTTP client |
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
res, err := client.Get("http://www.gojek.io/", nil) | |
if err != nil { | |
panic(err) | |
} | |
fmt.Println(string(res.Body())) |
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 queue | |
import ( | |
"fmt" | |
"log" | |
"github.com/streadway/amqp" | |
) | |
var conn *amqp.Connection |
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
func main() { | |
conn, err := net.Dial("udp", "127.0.0.1:8125") | |
if err != nil { | |
fmt.Printf("Some error %v", err) | |
return | |
} | |
for i := 0; i < 10; i++ { | |
// This is the only line of code you need to push stats to telegraf | |
fmt.Fprintf(conn, "deploys.test.myservice,from=go:1|c") | |
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 ( | |
"crypto" | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/sha256" | |
"encoding/base64" | |
"fmt" | |
) |
OlderNewer