Skip to content

Instantly share code, notes, and snippets.

View rubenerd's full-sized avatar

Ruben Schade rubenerd

View GitHub Profile
@rubenerd
rubenerd / randomart-camel.txt
Created October 20, 2014 23:27
Camel RSA randomart
+--[ RSA 4096]----+
| |
| o .|
| . . . ++|
| . o o +.E|
| . + . S o. o ..|
| = o o .. o .|
| . . . . o |
| .. . . |
| .. . |
@rubenerd
rubenerd / debian-serverbear.sh
Last active August 29, 2015 14:08
Building Debian system for ServerBear tests
#!/bin/sh
## Script for running private ServerBear tests on Debian
PLAN="Some Hosting Plan"
EMAIL="someone@example.com"
sudo -s
apt-get update
apt-get dist-upgrade
@rubenerd
rubenerd / vyos-for-vyatta.sh
Created October 24, 2014 07:02
Install VyOS repo on Vyatta
#!/bin/vbash
## Script to install VyOS community repos on Vyatta
source /opt/vyatta/etc/functions/script-template
delete system package repository community
set system package repository community components 'main'
set system package repository community distribution 'hydrogen'
set system package repository community url 'http://mirror.vyos-users.jp/vyos'
commit
@rubenerd
rubenerd / wget-symlink.sh
Last active August 29, 2015 14:08
Protect oneself from wget's symlink attack
@rubenerd
rubenerd / qcow2-hvm.cfg
Created November 3, 2014 07:16
Using qcow2 images in Xen 4.1 on Debian
disk = ['tap:qcow2:/path/disk.qcow2,xvda,w']
@rubenerd
rubenerd / intstring.py
Created November 8, 2014 23:51
Basic Python string to int, and back
#!/usr/bin/env python
spam = 42
eggs = "24"
## "Casting" form ints and strings
ingredients = spam + int(eggs)
menu = str(spam) + eggs
## Alternative using str method
@rubenerd
rubenerd / debian-fah.sh
Last active August 29, 2015 14:09
Basic Debian FAH cloud instance
#!/bin/sh
## Build a basic headless Debian Folding@Home 7.4.4 cloud instance
## F*** Bitcoin, this is more important
SOURCE="https://fah.stanford.edu/file-releases/public/release/fahclient/debian-testing-64bit/v7.4/fahclient_7.4.4_amd64.deb"
## Install and update basics
apt-get update
apt-get dist-upgrade
@rubenerd
rubenerd / replace-folder-terms.sh
Created November 17, 2014 03:14
Find and replace terms in folder of files
## BSD
find ./ -type -f -exec sed -i -e '' 's/something/else' {} \;
## GNU
find ./ -type -f -exec sed -i -e 's/something/else' {} \;
@rubenerd
rubenerd / packer-debian.sh
Created November 20, 2014 23:35
Install binary Packer on Debian
#!/bin/sh
destination="/usr/local/packer"
latest="0.7.2"
mkdir -P ${destination}
cd ${destination}
curl -OL "https://dl.bintray.com/mitchellh/packer/packer_${latest}_linux_amd64.zip"
unzip packer_${latest}_linux_amd64.zip
rm $packer_${latest}_linux_amd64.zip
@rubenerd
rubenerd / ubuntu-xen-44.sh
Created November 27, 2014 23:36
Bootstrap Ubuntu Xen 4.4 Dom0
#!/bin/sh
## Bootstrap simple Xen Dom0 with:
## - Bridged networking, LAN DHCP
## - SSH tunneled VNC access for DomUs
## - Using Ubuntu instead of Debian for Xen 4.4
## Elevate and update
sudo -s
apt-get update