Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
func fullURL(r *http.Request, overridePath ...string) string { | |
scheme := "http" | |
if r.TLS != nil { | |
scheme = "https" | |
} | |
if len(overridePath) != 0 { | |
return fmt.Sprintf("%s://%s%s", scheme, r.Host, overridePath[0]) | |
} | |
return fmt.Sprintf("%s://%s%s?%s#%s", scheme, r.Host, r.URL.Path, r.URL.RawQuery, r.URL.Fragment) |
1 copy the file into /etc/init.d/xvfb | |
2 chmod +x /etc/init.d/xvfb | |
3 ./etc/init.d/xvfb start | |
4 # some headless test here | |
5 ./etc/init.d/xvfb stop |
Picking the right architecture = Picking the right battles + Managing trade-offs
#!/usr/bin/env python3 | |
# original: https://raw.githubusercontent.com/tweksteen/jenkins-decrypt/master/decrypt.py | |
# requires: pycrypto | |
import re | |
import sys | |
import base64 |
<toolSet name="Code Checking"> | |
<tool name="Flake8" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="true" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="/usr/local/bin/flake8" /> | |
<option name="PARAMETERS" value="--max-complexity 10 $FilePath$" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
<filter> | |
<option name="NAME" value="Filter 1" /> | |
<option name="DESCRIPTION" /> |
#!/bin/bash | |
# References | |
# http://www.computerhope.com/unix/nc.htm#03 | |
# https://github.com/daniloegea/netcat | |
# http://unix.stackexchange.com/questions/26715/how-can-i-communicate-with-a-unix-domain-socket-via-the-shell-on-debian-squeeze | |
# http://unix.stackexchange.com/questions/33924/write-inside-a-socket-open-by-another-process-in-linux/33982#33982 | |
# http://www.linuxjournal.com/content/more-using-bashs-built-devtcp-file-tcpip | |
# http://www.dest-unreach.org/socat/ | |
# http://stuff.mit.edu/afs/sipb/machine/penguin-lust/src/socat-1.7.1.2/EXAMPLES |
#!/sbin/runscript | |
# GitLab 4.1 init script for Gentoo Linux | |
# see https://github.com/gitlabhq/gitlabhq/blob/master/doc/installation.md | |
GITLAB_BASE=/home/gitlab/gitlab | |
GITLAB_USER=gitlab | |
depend() { | |
need net redis | |
} |
import binascii | |
import StringIO | |
class PKCS7Encoder(object): | |
def __init__(self, k=16): | |
self.k = k | |
## @param text The padded text for which the padding is to be removed. | |
# @exception ValueError Raised when the input padding is missing or corrupt. | |
def decode(self, text): |