Skip to content

Instantly share code, notes, and snippets.

@hamstar
hamstar / mine.conf
Created October 21, 2013 22:56
Custom labels for `lm_sensors` by putting this file in `/etc/sensors.d`.
chip "radeon-pci-0200"
label temp1 "GPU 0"
chip "radeon-pci-0300"
label temp1 "GPU 1"
@hamstar
hamstar / inittab
Last active December 20, 2015 16:29
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
# The default runlevel.
id:2:initdefault:
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS
@hamstar
hamstar / dnsserv.rb
Created May 1, 2013 17:47
Simple DNS server in ruby. Tested and it works!
#!/usr/bin/env ruby
require 'rubygems'
require 'rubydns'
$R = Resolv::DNS.new
Name = Resolv::DNS::Name
IN = Resolv::DNS::Resource::IN
Hosts = "/etc/dnsserv/hosts"

Backup Documentation

Please see [Editing the Wiki][] before making any changes.

Introduction

[Getting Started][]

[The Command Line Utility][]

[Performing Backups][]

[Automatic Backups][]

[Technical Overview][]

@hamstar
hamstar / rvm-packages.md
Created April 29, 2013 07:59
Required packages for RVM

RVM Required Packages

These are the packages required by RVM. When doing rvm install it will try to install these packages with sudo. Maybe if you don't have sudo install you could try installing these manually.

apt-get install bash, curl, patch, bzip2, ca-certificates, g++, gcc, make, libc6-dev, patch, openssl, ca-certificates, libreadline6, libreadline6-dev, curl, zlib1g, zlib1g-dev, libssl-dev, libyaml-dev, libsqlite3-dev, sqlite3, libxml2-dev, libxslt1-dev, autoconf, libc6-dev, libgdbm-dev, libncurses5-dev, automake, libtool, bison, pkg-config, libffi-dev
apt-get install xinetd
wget http://mathias-kettner.de/download/check-mk-agent_1.2.0p4-2_all.deb
dpkg -i check-mk-agent_1.2.0p4-2_all.deb
ls -l /etc/xinetd.d/check_mk
service xinetd restart
wget https://www.dropbox.com/s/xg89ycqm5gurkzu/observium-agent_0.2.0-beta_all.deb
dpkg -i observium-agent_0.2.0-beta_all.deb # say yes to link munin plugins
dpkg -i asl-node_0.6-stable_all.deb
# if this step fails on deps then run this:
#apt-get install -f
@hamstar
hamstar / app_init.sh
Last active December 15, 2015 12:39
Init script for a ruby app
#!/bin/bash
path="/home/user/app"
port="3030"
user="user"
branch="stable"
gemset="1.9.3@app"
usage() {
echo "Usage: $0 {start|stop|restart|migrate|update}"
@hamstar
hamstar / gist:5140238
Last active December 14, 2015 19:58
Setup openvpn server
cp /usr/share/doc/openvpn/examples/easy-rsa /etc/openvpn -Rvf
cd /etc/openvpn/easy-rsa/2.0
nano vars
#make changes to variables at the very bottom
source ./vars
./build-ca
./build-dh
./build-key-server server
cd keys
cp server.crt server.key ca.crt dh1024.pem /etc/openvpn
@hamstar
hamstar / build.sh
Last active December 14, 2015 05:19
build a kernel
mkdir /build/boot -p
export BUILD_DIR="/build/"
cd linux-stable
make clean
ARCH=i386 make menuconfig
... do stuff ...
ARCH=i386 make -j10
INSTALL_MOD_PATH=$BUILD_DIR ARCH=i386 make modules_install
cp arch/i386/boot/bzImage $BUILD_DIR/boot/vmlinuz
@hamstar
hamstar / StopOffice2010Corruptions.vbs
Last active December 27, 2016 03:50
VBS script to stop Office 2010 corrupting profiles stored on Novell servers due to long file names.
' ***************************************************
'
' What: StopOffice2010Corruptions.vbs
' Who: Robert McLeod
' When: 27/01/2013
'
' This script stops Office 2010 corrupting profiles
' by moving the auto recover locations to a folder
' that isn't replicated to the file server
'