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. |
1 { | |
1: "\000\203\003\276\260\227\301\264\r+\030c\262\336\204\2006\323B@I\346b V\001\037\333\030^m\326\353\001\005\250k\221\\\203\262\362D_\273\201\215\301\377_\366\301\233\377\256I\343\221p\363^\332\234\306h\206\225}x\242h\310\244\217\020\342\366J\375d\211\312\225MgS}\220\225\026$m[\353O\177\027\326f.\311\333t\032\016-\322\010E\2251B\037\323\301\314P\335\325\206]\324\1770\373\316\316\204\3059JYDm\202f\267\332\341\224w\230\265\006r\330\241<\24527\221\336\3626\017\336tr\035\275\200f\245\360Gm\247\216\005\246\366\317w<\364c\n\205\007\304a6\317\367C\2148\362\241\340\307#K\305\254?!$\302\340)G\354\236Eg\360\361\234\004\273r\177\244\'\376\365\325s\310\331\n\311\302\371)\366\313\377\304i\"\206}\227\246.OF\337z8\2316\243\037\252%\251\276\251YU\351\227\025\005\303\216\330\'\312X^V\326\314\342\323\016\037\336\366\'#)\271l\256\371-i\210?-uz\0007T\241\362H\236e\031\244\004\365\010YV\342aGU\325o\370\266\373`G-\330\014U:\307\330\344eT\355\321j\rB~\320%en\213\265m+\336\344\330\215~\252\030\352\255O\354\250\361\207\016@\01 |
-- 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: