Skip to content

Instantly share code, notes, and snippets.

@skull-squadron
skull-squadron / gist:670144
Created November 10, 2010 00:45
Replacing init
#init.pp
node "default" {
include test
}
class test {
filebucket {
#!/bin/sh
wget -qO - http://pkg.hudson-labs.org/debian/hudson-labs.org.key | sudo apt-key add -
sudo add-apt-repository http://pkg.hudson-labs.org/debian binary
sudo apt-get update
sudo apt-get install hudson
@skull-squadron
skull-squadron / Automatically install Hudson on Ubuntu and Debian-based *nixs
Created December 25, 2010 05:57
Be advised: Fully automatic installation. Use with care.
#!/bin/sh
# Install Hudson from the experimental repository.
sudo su - -c " \
wget -qO- http://pkg.hudson-labs.org/debian/hudson-labs.org.key | sudo apt-key add - \
&& echo 'deb http://pkg.hudson-labs.org/debian binary/' > /etc/apt/sources.list.d/hudson.list \
&& apt-get update \
&& apt-get install -y hudson \
"
@skull-squadron
skull-squadron / darwinkick
Created April 27, 2011 19:27
Script to restart an apple mac os x 10.6 built-in service
#!/usr/bin/env bash
if [[ "`uname -s`" != "Darwin" ]]
then
echo "Error: can only restart system services on Macs."
exit 1
done
sudo bash -c "launchctl unload /System/Library/LaunchDaemons/com.apple.$1.plist; sleep 3; launchctl load /System/Library/LaunchDaemons/com.apple.$1.plist"
@skull-squadron
skull-squadron / gist:950593
Created May 1, 2011 15:45
Disable quiet booting and plymouth on Debian/Ubuntu
sudo sed -i 's/\(GRUB_CMDLINE_LINUX_DEFAULT="\)quiet"/\1"/' /etc/default/grub  
sudo sed -i 's/\(GRUB_CMDLINE_LINUX="[^"]*\)"/\1 nosplash noplymouth"/' /etc/default/grub  
sudo update-grub  

Caveat: This breaks anything requiring plymouth to interact with user interaction, likely debsel stuff.

@skull-squadron
skull-squadron / gist:950555
Created May 1, 2011 15:03
Debian/Ubuntu non-headless console mode scrolling speedup

/etc/modprobe.d/blacklist-framebuffer.conf: blacklist vga16fb

Also: debian-installer/framebuffer fb=false, video=vga16:off

@skull-squadron
skull-squadron / gist:950550
Created May 1, 2011 14:57
Solved debian/ubuntu upstart + ureadahead + udev + partitioning issue
/etc/fstab:
... /var ... 0 1
... /var/log ... 0 1
... /var/tmp ... 0 1
/etc/init/ureadahead.conf:
start on (starting mountall
or starting mounted MOUNTPOINT=/var
or starting mounted MOUNTPOINT=/var/log
or starting mounted MOUNTPOINT=/var/tmp
@skull-squadron
skull-squadron / gist:962053
Created May 9, 2011 04:27
torquebox 1.0.0 (gem vs packaged)
-FastInfoset.jar
-XmlSchema.jar
acl-spi-3.0.0.CR2.jar
activation-1.1.jar
-activation.jar
ant-1.7.1.jar
ant-launcher-1.7.1.jar
-antlr.jar
-apache-mime4j-0.6.jar
-asm.jar
@skull-squadron
skull-squadron / gist:961989
Created May 9, 2011 03:08
haproxy security #fail
*deny parameters do not work!! #epicfail
admin uri will occasionally pass the admin uri itself to a backend randomly instead of displaying #fail
@skull-squadron
skull-squadron / gist:1117362
Created July 31, 2011 23:58
a tastier beverage
# ping with UTC time
pint(){
local TIMEOUTOPT='W'
case "`uname -s`" in
Darwin) TIMEOUTOPT='t' ;; # -t (seconds) timeout for mac/bsd
Linux) TIMEOUTOPT='W' ;; # -W (seconds) timeout for linux
*) echo "pint() Unsupported system" ; return 1 ;;
esac