Created from the plain text reference card on orgmode.org Download this file, and open it in Emacs org-mode!
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
| @echo off | |
| TITLE Open a folder and start localhost | |
| D: | |
| cd "D:\Source codes" | |
| python -m SimpleHTTPServer | |
| ::python -m SimpleHTTPServer -p 8000 |
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
| ECHO OFF | |
| TITLE Ifconfig | |
| ::CMD will no longer show us what command it’s executing(cleaner) | |
| ECHO As a network admin, I m getting tired of having to type these commands in! Hopefully, this saves me some time in the long run. | |
| :: Print some text | |
| IPCONFIG /ALL | |
| :: Outputs tons of network information into the command prompt | |
| PAUSE | |
| :: Lets the user read the important network information | |
| PING www.google.com |
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
| ECHO OFF | |
| ::CMD will no longer show us what command it’s executing(cleaner) | |
| "C:\Users\Desktop\cat" developerparams |
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
| @echo off | |
| TITLE Git Update | |
| D: | |
| cd D:\trunk\test | |
| git pull origin master | |
| pause |
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 ( | |
| "myapp/webserver/app/common" | |
| "github.com/golang/glog" | |
| "github.com/gorilla/mux" | |
| "encoding/json" | |
| "strconv" | |
| "flag" | |
| "fmt" |
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 ( | |
| "fmt" | |
| "time" | |
| ) | |
| func main() { | |
| ticker := time.NewTicker(5 * time.Second) | |
| for { |
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 ( | |
| "errors" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "github.com/afex/hystrix-go/hystrix" |
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
| // CommandConfig is used to tune circuit settings at runtime | |
| type CommandConfig struct { | |
| Timeout int `json:"timeout"` | |
| MaxConcurrentRequests int `json:"max_concurrent_requests"` | |
| RequestVolumeThreshold int `json:"request_volume_threshold"` | |
| SleepWindow int `json:"sleep_window"` | |
| ErrorPercentThreshold int `json:"error_percent_threshold"` | |
| } |
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
| // ErrMaxConcurrency occurs when too many of the same named command are executed at the same time. | |
| ErrMaxConcurrency = CircuitError{Message: "max concurrency"} | |
| // ErrCircuitOpen returns when an execution attempt "short circuits". This happens due to the circuit being measured as unhealthy. | |
| ErrCircuitOpen = CircuitError{Message: "circuit open"} | |
| // ErrTimeout occurs when the provided function takes too long to execute. | |
| ErrTimeout = CircuitError{Message: "timeout"} |