openssl req -nodes -newkey rsa:2048 -nodes -keyout privateKey.key -out CertRequest.csr -subj "/CN=mydomain.com"
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt
package main | |
import ( | |
"io" | |
"log" | |
"net" | |
"time" | |
) | |
func reader(r io.Reader) { |
-- Insert in your rc.lua to globalkeys (may be after mod+x) defining | |
-- In awesome 4.0 : | |
awful.key({ modkey }, "c", | |
function () | |
awful.prompt.run { | |
prompt = "Calculate: ", | |
textbox = awful.screen.focused().mypromptbox.widget, | |
exe_callback = function (text) | |
awful.spawn.easy_async( | |
"python -c \"from math import * ; print(" .. text .. ")\"", |
The GCC distributed with CentOS 6 is 4.4.7, which is pretty outdated. I'd like to use gcc 4.8+. Also, when trying to install Linuxbrew you run into a dependency loop where Homebrew's gcc depends on zlib, which depends on gcc. Here's how I solved the problem.
Note: Requires sudo
privileges.
# ag <https://github.com/ggreer/the_silver_searcher> | |
# usage: ag-replace.sh [search] [replace] | |
# caveats: will choke if either arguments contain a forward slash | |
# notes: will back up changed files to *.bak files | |
ag -0 -l $1 | xargs -0 perl -pi.bak -e "s/$1/$2/g" | |
# or if you prefer sed's regex syntax: | |
ag -0 -l $1 | xargs -0 sed -ri.bak -e "s/$1/$2/g" |
package main | |
import ( | |
"log" | |
"math" | |
) | |
func Round(val float64, roundOn float64, places int ) (newVal float64) { | |
var round float64 | |
pow := math.Pow(10, float64(places)) |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.