start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/bash | |
CYGWIN=server | |
CYGSERVER=/usr/sbin/cygserver | |
PGDATA=/var/psql/data | |
PGCTL=/usr/sbin/pg_ctl | |
PGLOG=/var/psql/log/postgresql.log | |
usage() { | |
echo "USAGE: pg (start|stop|restart|reload|status)" | |
echo |
package main | |
import ( | |
"fmt" | |
"github.com/codegangsta/negroni" | |
"github.com/julienschmidt/httprouter" | |
"net/http" | |
) | |
func main() { |
package future | |
// A Future represents the result of some asynchronous computation. | |
// Future returns the result of the work as an error, or nil if the work | |
// was performed successfully. | |
// Implementers must observe these invariants | |
// 1. There may be multiple concurrent callers, or Future may be called many | |
// times in sequence, it must always return the same value. | |
// 2. Future blocks until the work has been performed. | |
type Future func() error |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
// Now available in package form at https://github.com/rjz/githubhook | |
package handler | |
// https://developer.github.com/webhooks/ | |
import ( | |
"crypto/hmac" | |
"crypto/sha1" | |
"encoding/hex" | |
"errors" |
#!/bin/bash | |
# Based on the directions here: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot | |
# This will take a while to build, with most of the time spent on QT4. There is some redundancy with creating | |
# multiple clean chroots, but I think this approach is easier and more reliable for most systems. | |
# Specify a build directory. Defaults to /tmp: | |
BUILDDIR="/tmp" | |
# Install devtools if it's not already installed: |
package main | |
import ( | |
"encoding/hex" | |
"fmt" | |
"os" | |
"github.com/decred/dcrd/chaincfg/chainhash" | |
"github.com/decred/dcrd/txscript/v4" | |
"github.com/decred/dcrd/wire" |