Run these commands as root to create a 512 megabyte swap.
fallocate -l 512m /media/state/512MiB.swap
chmod 600 /media/state/512MiB.swap
mkswap /media/state/512MiB.swap
#!/bin/bash | |
# | |
# simple script to create a vagrant.box from a vmware fusion source VM | |
# andrew_diller@gmail.com July 2013 | |
# | |
FUSIONTOOL='/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager' | |
METADATAFILE=metadata.json | |
if [ $# -lt 3 ] |
# Vagrant VMWare Fusion Centos6 | |
# HOWTO by Andrew Diller, dillera@gmail.com | |
# July 2013 v.1 | |
# | |
# | |
# Vagrant version 1.2.4 | |
# vmrun version 1.12.1 build-1040386 | |
# Fusion - Professional Version 5.0.3 (1040386) | |
# | |
# |
PROFILE=~/.bash_profile | |
sudo yum --enablerepo=rpmforge,epel,remi -y install gcc make zlib zlib-devel openssl-devel zsh | |
cd ~ | |
test -d ~/.rbenv || git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
grep 'rbenv/bin' $PROFILE &>/dev/null || echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $PROFILE | |
grep 'rbenv init' $PROFILE &>/dev/null || echo 'eval "$(rbenv init -)"' >> $PROFILE | |
grep 'unset RUBYLIB' $PROFILE &>/dev/null || echo 'unset RUBYLIB' >> $PROFILE | |
test -d ~/ruby-build || git clone https://github.com/sstephenson/ruby-build.git ~/ruby-build | |
cd ~/ruby-build && sudo ./install.sh | |
source $PROFILE |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://gist.github.com/dillera/8108813/raw/ed65b97d3b910cb3536c3e522d4baebd442ff512/hack.sh | sh | |
# |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
#!/bin/bash | |
# | |
# PostgreSQL Backup Script Ver 1.0 | |
# http://autopgsqlbackup.frozenpc.net | |
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com> | |
# | |
# This script is based of the AutoMySQLBackup Script Ver 2.2 | |
# It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
# | |
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |
# Power seems to be working | |
[89065.240448] PM: Preparing system for sleep (freeze) | |
[89065.240644] Freezing user space processes ... (elapsed 0.150 seconds) done. | |
[89065.391305] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. | |
[89065.392692] PM: Suspending system (freeze) | |
[89065.392699] Suspending console(s) (use no_console_suspend to debug) | |
[89067.525590] PM: suspend of devices complete after 2129.860 msecs | |
[89067.539839] PM: late suspend of devices complete after 14.220 msecs | |
[89067.551647] PM: noirq suspend of devices complete after 11.776 msecs |
require 'rubygems' | |
require 'net/ldap' #gem install --no-rdoc --no-ri net-ldap | |
ldap = Net::LDAP.new :host => "172.16.138.142", | |
:port => 389, | |
:auth => { | |
:method => :simple, | |
:username => "cn=admin,o=novell", | |
:password => "n0v3ll" | |
} |
#!/usr/bin/python | |
# http://www.packtpub.com/article/python-ldap-applications-ldap-opearations | |
# sudo apt-get install python-ldap | |
import ldap | |
host = 'ldap://example.com:389' | |
dn = 'ldap@example.com' |