Skip to content

Instantly share code, notes, and snippets.

@JeffreyVdb
JeffreyVdb / optimizations.sh
Last active August 29, 2015 14:01
Vagrant lucid base box scripts
#!/bin/bash
# exit script if not run as root
if [[ $EUID -ne 0 ]]; then
cat <<END
you need to run this script as the root user' >&2
use :privileged => true in Vagrantfile
END
exit 1
@JeffreyVdb
JeffreyVdb / install_ruby.sh
Last active August 29, 2015 14:01
Ruby install from source
install_ruby() {
# install dependencies
apt-get -y install zlib1g-dev libssl-dev libc6-dev libncurses5-dev
# due to problems on openssl on debian based distributions, install the
# openssl package from tvm and point to this location using the configure
# flags
#
# install rvm
apt-get -y install curl
@JeffreyVdb
JeffreyVdb / visit_urls.pl
Last active August 29, 2015 14:01
Perl async url getter for refreshing drupal cronjob links
#!/usr/bin/env perl
use Modern::Perl;
use autodie;
use warnings;
use threads;
use Thread::Queue qw( );
use Getopt::Long;
require LWP::UserAgent;
use Benchmark;
@JeffreyVdb
JeffreyVdb / 0_reuse_code.js
Created May 22, 2014 18:43
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@JeffreyVdb
JeffreyVdb / postinstall.sh
Last active August 29, 2015 14:01 — forked from evansd/postinstall.sh
Vagrant post box virtual machine installation script
#!/bin/bash
# Setup a debian based vagrant machine
TO_CLEAN_PKGS=()
nullify_free_space() {
echo 'clearing free space'
dd if=/dev/zero of=/EMPTY bs=1M
rm -f /EMPTY
}