For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# http://andre.arko.net/2011/05/26/add-true-readline-to-ruby-on-os-x-1067/ | |
# Install readline | |
brew install readline | |
# Download the readline extension | |
cd /tmp | |
svn co http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7_174/ext/readline/ | |
# Compile the bundle against homebrewed readline | |
make readline.o CFLAGS=‘-I/usr/local/Cellar/readline/6.1/include -DHAVE_RL_USERNAME_COMPLETION_FUNCTION’ |
#http://blog.doteight.com/2011/01/16/rlwrap-and-node.html | |
#http://utopia.knoware.nl/~hlub/rlwrap/rlwrap.html | |
alias node='env NODE_NO_READLINE=1 rlwrap -p Green -S "node >>> " node' |
ssh user@host "tar -zc --one-file-system -f - /" > host-partition-date.tar.gz | |
ssh user@host "dd if=/dev/sda | bzip2" > host-sda.dd.bz2 | |
# http://cb.vu/unixtoolbox.xhtml | |
server# dd if=/dev/da0 | nc -l 4444 # Server partition image | |
client# nc 192.168.1.1 4444 | dd of=/dev/da0 # Pull partition to clone | |
client# nc 192.168.1.1 4444 | dd of=da0.img # Pull partition to file | |
svn checkout http://dsocks.googlecode.com/svn/trunk/ dsocks | |
cd dsocks | |
bsdmake && sudo bsdmake install | |
cp dsocks.sh ~/bin/dsocks |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
#!/usr/bin/env ruby | |
# echo -n 'asdfasdf' |./hmacsha1 --key foobar' | |
# 60ff950bea9d6dc7018de881909057e4bba14e26 | |
require 'openssl' | |
require 'optparse' | |
key = 'horriblekeychangeme' | |
algo = 'sha512' | |
verbose = false |
# hostnames | |
ack -oa '((\w+\.){1,3}domainname(\.\w+){1,3})' | cut -f3 -d':' | sort| uniq | |
# ipv4 addresses | |
ack -oa '((\d+\.){3,3}\d+(:\d+)?)' | cut -f3-4 -d':' | sort| uniq |
(echo "SET autocommit=0; SET unique_checks=0; SET foreign_key_checks=0;"; cat database_name.sql ; echo "COMMIT;" ) | mysql database_name | |
# in /etc/my.cnf set: | |
# innodb_flush_log_at_trx_commit = 2 | |
# innodb_file_per_table | |
# check size of databases: | |
#SELECT table_schema AS "Data Base Name", | |
#ROUND(SUM( data_length + index_length ) / 1024 / 1024, 2) AS "Data Base Size in MB" | |
#FROM information_schema.TABLES GROUP BY table_schema ; |
require 'formula' | |
class MacvimSplitBrowser < Formula | |
homepage 'https://github.com/jwilkins/macvim/' | |
url 'https://github.com/jwilkins/macvim/tarball/7b9e621f41ad0193336c18fe0ad239ab2c4cc15a' | |
version '20130208' | |
sha1 '8d966f95a335d34e79cf8d7d2f784718b7f1af41' | |
head 'https://github.com/jwilkins/macvim.git' #, :branch => 'split-browser' |
#!/bin/bash | |
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done; | |
/Applications/p4merge.app/Contents/Resources/launchp4merge "${absargs[@]}" | |