sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminatorTerminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").
| # Borrowed from: | |
| # https://github.com/silven/go-example/blob/master/Makefile | |
| # https://vic.demuzere.be/articles/golang-makefile-crosscompile/ | |
| BINARY = superdo | |
| VET_REPORT = vet.report | |
| TEST_REPORT = tests.xml | |
| GOARCH = amd64 | |
| VERSION?=? |
| /* | |
| * Genarate rsa keys. | |
| */ | |
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" |
| timeout := time.Duration(5 * time.Second) | |
| client := http.Client{ | |
| Timeout: timeout, | |
| } | |
| client.Get(url) | |
| /////////////////////////////////////////////////////// | |
| var timeout = time.Duration(2 * time.Second) |
| =begin | |
| Pocket Export.rb | |
| My first 'real' Ruby script (hello world)! | |
| More info here: http://blog.ctis.me/2015/12/archiving-your-pocket-articles-with-ruby.html | |
| DEPENDENCIES: | |
| pocket_export requires the following gems: | |
| curb | |
| nokogiri | |
| /* | |
| Usage: go run main.go < /path/to/private-key.xml | |
| Optionally takes base64 encoded input. | |
| This is a very crude implementation. Any errors result in a panic. | |
| */ | |
| package main | |
| import ( |
by alexander white ©
| from bs4 import BeautifulSoup | |
| import requests | |
| r = requests.get('http://golang.org/ref/spec') | |
| soup = BeautifulSoup(r.text) | |
| bnf = soup.find_all('pre', class_='ebnf') | |
| bnftxt = [x.get_text() for x in bnf] | |
| bnftxt = ''.join(bnftxt) |
| if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { | |
| // path/to/whatever does not exist | |
| } | |
| if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) { | |
| // path/to/whatever exists | |
| } |