This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## Protect oneself from wget's symlink attack (CVE-2014-4877) | |
## Good idea to do this even if you update to 1.16 | |
echo 'retr-symlinks=on' >> /usr/local/etc/wgetrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disk = ['tap:qcow2:/path/disk.qcow2,xvda,w'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## BSD | |
find ./ -type -f -exec sed -i -e '' 's/something/else' {} \; | |
## GNU | |
find ./ -type -f -exec sed -i -e 's/something/else' {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# $FreeBSD$ | |
# | |
# Runs as unprivileged user "rtorrent" | |
# Lives in "tmux" (like "screen") because rtorrent can't daemonize itself | |
# To access rtorrent client that's in the tmux: su - rtorrent && tmux attach | |
# To detach the tmux and leave rtorrent running: Ctrl-B then D | |
# nice'd default +10 step to make it go easy on the machine | |
# Don't forget to put rtorrent_enable="YES" in your /etc/rc.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## No need for horrible GUI bootable USB key generators | |
## Haven't seen if there's a memtest86+ equiv | |
key="/dev/sdb" ## TRIPLE CHECK this drive location first | |
curl -OL "http://www.memtest86.com/downloads/memtest86-usb.tar.gz" | |
tar xzvf memtest86-usb.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |