Skip to content

Instantly share code, notes, and snippets.

View dickolsson's full-sized avatar

Dick Olsson dickolsson

View GitHub Profile
@dickolsson
dickolsson / backup.sh
Last active July 14, 2025 22:10
Simple backup script that will backup package list, files and databases.
#!/bin/sh
#
# A simple Arch Linux backup script.
#
# Example config that targets external mount, keeping backups for a week and
# mirror the backups to local and external disks:
#
# $ cat /etc/backuprc
# backup_target=/mnt/data01/myhost
# backup_days_kept=7
@dickolsson
dickolsson / Vagrantfile
Created October 7, 2014 19:12
Basic Vagrantfile
Vagrant.configure("2") do |c|
c.vm.box = "trusty"
c.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
c.vm.network :private_network, ip: "192.168.33.30"
c.ssh.forward_agent = true
c.vm.synced_folder "./html", "/var/www/html", nfs: true
c.vm.synced_folder "./src", "/usr/local/src", nfs: true
@dickolsson
dickolsson / drupal-provisioner
Last active June 8, 2017 15:55
Provisioning script for a simple PHP/Drupal development environment
#!/bin/bash
#
# Configure your IDE to listen to connections with these settings:
#
# * Max simultaneous connections: 3
# * Xdebug port: 9001
# * DBGp host: <blank>
# * DBGp port: 9001
# * IDE key: MYIDE
#
@dickolsson
dickolsson / puppet-provisioner
Last active October 10, 2015 19:58
Puppet bootstrap script for Ubuntu servers.
#!/bin/bash
# Puppet bootstrapping. Currently only supports Ubuntu 12.04.
#
# TODO:
# - Make idempotent
# - Support Ubuntu 10.04 and Debian 6
version_os=`expr match "$(lsb_release -c)" '.*\<\(.*\)$'`
version_stdlib=03ec16e291a70ac5ac412be36ae3b86a771b98af