Skip to content

Instantly share code, notes, and snippets.

View adamancini's full-sized avatar

ada mancini adamancini

View GitHub Profile
class phr_test (
$vertex_dir = '/usr/vertex',
)
{
}
class phr_unidata (
$vertex2_dir = $phr_test::vertex_dir,
)
{
}
@adamancini
adamancini / Vagrantfile-puppet-ubuntu-multi
Created November 14, 2015 03:47 — forked from frozenfoxx/Vagrantfile-puppet-ubuntu-multi
A simple Vagrantfile for spinning up a master-agent pair.
Vagrant.require_version ">= 1.5.0"
require 'vagrant-hosts'
require 'vagrant-auto_network'
Vagrant.configure('2') do |config|
config.vm.define :puppetmaster do |node|
# An index of pre-built boxes can be found at:
#
# https://vagrantcloud.com/puppetlabs
@adamancini
adamancini / cron_helper.sh
Created October 17, 2015 08:34 — forked from liquidgecka/cron_helper.sh
Cron helper
#!/bin/bash
usage() {
cat << EOF
Usage: $0 [OPTION]... COMMAND
Execute the given command in a way that works safely with cron. This should
typically be used inside of a cron job definition like so:
* * * * * $(which "$0") [OPTION]... COMMAND
Arguments:
#!/bin/sh
#
set -ex
TEMP_DIR="$(mktemp -d -t XXXX)"
# cleanup
trap 'RESULT=$?; rm -rf "$TEMP_DIR" ; exit $RESULT' INT TERM EXIT QUIT
OLD_PWD="$PWD"
cd "$TEMP_DIR"
@adamancini
adamancini / 0_reuse_code.js
Last active August 29, 2015 14:07
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