As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/bin/bash | |
| # installing erlang on ubuntu's | |
| VERSION="R16B" | |
| sudo apt-get install curl build-essential libncurses5-dev openssl libssl-dev | |
| sudo mkdir -p /opt/erlang/ | |
| curl -O https://raw.github.com/spawngrid/kerl/master/kerl && chmod a+x kerl | |
| sudo mv kerl /opt/erlang/ |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| #include <graphics.h> | |
| #include <conio.h> | |
| #include <stdlib.h> | |
| int random (int N) { | |
| return rand() % N; | |
| } | |
| main() { | |
| int x, y, R, G, B; |
| // @requires https://gist.github.com/uhunkler/5465857 | |
| var text = 'to clipboard ' + new Date(), | |
| returnedtext = ''; | |
| clipboard.set( text ); | |
| returnedtext = clipboard.get(); | |
| test.assert( text === returnedtext, 'Text correctly copied and read to/from the clipboard' ); | |
| test.show(); |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| CLIENT/SERVER MODEL | |
| It is quite simple to build a very basic client/server model using nc. On one console, start nc listening on a specific port for a connection. For example: | |
| $ nc -l 1234 | |
| nc is now listening on port 1234 for a connection. On a second console (or a second machine), connect to the machine and port being listened on: | |
| $ nc 127.0.0.1 1234 | |
| There should now be a connection between the ports. Anything typed at the second console will be concatenated to the first, and vice-versa. After the connection has been set up, nc does not really care which side is being used as a ‘server’ and which |
| # basic pfctl control | |
| # == | |
| # Related: http://www.OpenBSD.org | |
| # Last update: Tue Dec 28, 2004 | |
| # == | |
| # Note: | |
| # this document is only provided as a basic overview | |
| # for some common pfctl commands and is by no means | |
| # a replacement for the pfctl and pf manual pages. |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This is a brief guide to creating a public/private key pair that can be used for OpenSSL. While the "easy" version will work, I find it convenient to generate a single PEM bundle and then export the private/public key from that as needed. This document also covers how to add and remove a password from your private key and how to make sure that keychain will automatically unlock it when you sign in.
Generate an ssh key-pair:
| <?php | |
| // Change the columns for the releases list screen | |
| function change_columns( $cols ) { | |
| $cols = array( | |
| 'cb' => '<input type="checkbox" />', | |
| 'featimg' => 'Featured Image', | |
| 'excerpt' => 'Excerpt?', | |
| 'title' => 'Title', | |
| 'artist' => 'Artist', | |
| 'catno' => 'Cat#', |