Skip to content

Instantly share code, notes, and snippets.

View aussielunix's full-sized avatar
🤠
G`Day

Mick Pollard aussielunix

🤠
G`Day
View GitHub Profile
virt-install --accelerate -n guppy -r 512 --vcpus=1 \
--disk pool=lvm,bus=virtio,size=35 --vnc --os-type linux --os-variant=rhel5 \
--network=network:default -l http://192.168.122.1/os/CentOS/5.5/os/x86_64/ -x "ks=http://192.168.122.1/ks/ks.cfg"
%post
chvt 3
echo "executing post install"
#
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
yum install -y puppet
cat >/etc/sysconfig/puppet <<EOF
PUPPET_EXTRA_OPTS="--environment test"
EOF
@aussielunix
aussielunix / gist:499875
Created July 30, 2010 04:03
virt-install from mirror Ubunut + CentOS
# install a ubuntu VM booting direct from mirror. no media needed.
virt-install --accelerate -n ubuntu-dev01 -r 1024 --vcpus=1 --disk pool=lvm,bus=virtio,size=10 --vnc --os-type linux --os-variant=generic26 --network=bridge:br0 -l http://ubuntu.intergenia.de/ubuntu/dists/lucid/main/installer-amd64/
# install a CentOS VM booting direct from mirror. no media needed. plus kickstart
virt-install --accelerate -n centos-dev01 -r 1024 --vcpus=1 --disk pool=lvm,bus=virtio,size=10 --vnc --os-type linux --os-variant=rhel5 --network=bridge:br0 -l http://192.168.1.250/os/centos/5.5/os/x86_64/ -x "ks=http://192.168.1.250/ks/centos-dev01.ks"
apt-get update
apt-get install build-essential subversion autotools-dev automake1.9 libtool autoconf libncurses-dev xsltproc quilt debhelper
cd /tmp
svn co http://www.varnish-cache.org/svn/tags/varnish-2.0.6
cd varnish-2.0.6/varnish-cache
dpkg-buildpackage
cd ..
dpkg -i libvarnish1_2.0.6-2_amd64.deb varnish_2.0.6-2_amd64.deb
@aussielunix
aussielunix / sshd_config_chroot_sftp_only
Created March 8, 2011 02:51
chroot a sftp only user with openssh 5
add the following to `sshd_config`
Subsystem sftp internal-sftp
Match User foo
ChrootDirectory /home/foo
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
// Fires up Asteroids through pressing Ctrl-A
//
var isCtrl = false;
$(document).keyup(function (e) {
if(e.which == 17) isCtrl=false;
}).keydown(function (e) {
if(e.which == 17) isCtrl=true;
if(e.which == 65 && isCtrl == true) {
if($('script#Asteroids').size()==0){
var s = document.createElement('script');s.type='text/javascript';
@aussielunix
aussielunix / devops_challenge
Created September 8, 2011 09:37
devops challenge
# Devops Challenge !
## Teams are supplied
* a copy of [imdb.sql](http://www.webstepbook.com/supplements/databases/imdb.sql)
* 4 ec2 instances to use however they see fit (example - 1 x web, 1 x monitor/metrics/backups, 2 x db)
* set of cucumber tests describing the app they need to build
## Adjudicating panel get
@aussielunix
aussielunix / linux_proc_name.rb
Created November 22, 2011 11:39 — forked from eric/linux_proc_name.rb
Update a process name in linux to change how it shows up in top and lsof
#
# Eric Lindvall <eric@5stops.com>
#
# Update the process name for the process you're running in.
#
# This will allow top, lsof, and killall to see the process as the
# name you specify.
#
# Just use:
#
@aussielunix
aussielunix / gist:1445258
Created December 7, 2011 23:23 — forked from jedi4ever/gist:1216529
Quick gist on getting vsphere and vcenter and fog/vsphere going
Quick gist on getting vsphere and vcenter and fog/vsphere going
# Things to download
- Download free evaluation version of window 2008
- Download free evaluation of esxi v5
- Download free evaluation of esxi vsphere (control center) iso
# Install esxi in vmware fusion
1)Install esxi in vmware (select vmware/esx as host)
create a user root/pipopopo
@aussielunix
aussielunix / httparty.rb
Created December 17, 2011 00:52 — forked from runemadsen/httparty.rb
Creating a repo via the Github API and HTTParty
class Github
include HTTParty
base_uri 'https://api.github.com'
end
Github.post("/user/repos", :query => {
:access_token => @token
},
:body => {
:name => name,