Skip to content

Instantly share code, notes, and snippets.

View andristeiner's full-sized avatar

Andri Steiner andristeiner

View GitHub Profile
/*
* This file was autogenerated by puppet. Do not edit manually!
*
* snowflake Varnish Configuration for APT Cache
*/
/*
* Backend Servers (APT Repositories)
*/
apt-get update && apt-get install -y mysql-server libmysqlclient-dev lzop libsqlite3-dev screen
service mysql start
echo "CREATE DATABASE phpbb;" | mysql
gem install mailcatcher && mailcatcher --http-ip 0.0.0.0
ssh <oldserver> mysqldump --single-transaction <olddb> | mysql phpbb
rsync -az <oldserver>:<oldpath> /var/www/phpbb/
chmod 777 /var/www/phpbb/ -R
sv stop unicorn
su - discourse
@andristeiner
andristeiner / ipaddress6_reverse.rb
Created January 29, 2015 07:56
Facter ipaddress6_reverse
Facter.add("ipaddress6_reverse") do
confine :ipaddress6
setcode do
file = "/proc/net/if_inet6"
if FileTest.exists?(file)
open(file).grep(/eth0/)[0].split.first.chomp.reverse.scan(/.{1}|.+/).join(".") + ".ip6.arpa."
end
end
end