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").
| /* | |
| 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 ( |
| =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 | |
| timeout := time.Duration(5 * time.Second) | |
| client := http.Client{ | |
| Timeout: timeout, | |
| } | |
| client.Get(url) | |
| /////////////////////////////////////////////////////// | |
| var timeout = time.Duration(2 * time.Second) |
| /* | |
| * Genarate rsa keys. | |
| */ | |
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" |
| # 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?=? |
🚨 2020 Update: I recommend using mkcert to generate local certificates. You can do everything below by just running the commands brew install mkcert and mkcert -install. Keep it simple!
This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.
sudo nano /etc/ssl/localhost/localhost.conf
| #!/usr/bin/python | |
| # | |
| # Copyright 2017 Otto Seiskari | |
| # Licensed under the Apache License, Version 2.0. | |
| # See http://www.apache.org/licenses/LICENSE-2.0 for the full text. | |
| # | |
| # This file is based on | |
| # https://github.com/swagger-api/swagger-ui/blob/4f1772f6544699bc748299bd65f7ae2112777abc/dist/index.html | |
| # (Copyright 2017 SmartBear Software, Licensed under Apache 2.0) | |
| # |
| // https://medium.com/@mlowicki/http-s-proxy-in-golang-in-less-than-100-lines-of-code-6a51c2f2c38c | |
| // #!/usr/bin/env bash | |
| // case `uname -s` in | |
| // Linux*) sslConfig=/etc/ssl/openssl.cnf;; | |
| // Darwin*) sslConfig=/System/Library/OpenSSL/openssl.cnf;; | |
| // esac | |
| // openssl req \ | |
| // -newkey rsa:2048 \ | |
| // -x509 \ |