Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ancillas on github.
  • I am gbaker (https://keybase.io/gbaker) on keybase.
  • I have a public key whose fingerprint is 513B 4C05 617F 17E1 DE34 796A 6041 1F64 8D6E E244

To claim this, I am signing this object:

@Ancillas
Ancillas / test.pp
Last active August 29, 2015 14:11
Puppet conditional testing
class test1 {
$color = 'dirt'
if ($color != 'dirt') or ($color != 'blue') {
notify {"test1: conditional true": }
} else {
notify {"test1: conditional false": }
}
}
import requests
class HoverException(Exception):
pass
class HoverAPI(object):
def __init__(self, username, password):
params = {"username": username, "password": password}
r = requests.post("https://www.hover.com/api/login", params=params)
@Ancillas
Ancillas / deploy.rb
Last active December 20, 2015 12:59
Patched r10k cli/deploy.rb file.
require 'r10k/cli'
require 'r10k/deployment'
require 'r10k/deployment/config'
require 'r10k/task_runner'
require 'r10k/task/deployment'
require 'cri'
module R10K::CLI
@Ancillas
Ancillas / cfdecrypter.py
Last active December 17, 2015 23:09
A small python script to encrypt strings for use in ColdFusion config files. Normally config files, such as neo-datasource.xml, are generated by the ColdFusion admin tool. It encrypts password strings, and puts the encrypted value in the config files. This script will allow you to pre-encrypt strings, which makes administrative control easier wh…
import pyDes
from pyDes import *
import base64
import getpass
import sys
pwd = getpass.getpass('Enter password')
key = getpass.getpass('Enter key (optional)')
if not key:
# == Class: dns
#
# This module creates a DNS configuration file for the supplied nameservers and
# domain. It also supports an optional options string.
#
# === Supported Operating-Systems
#
# Ubuntu
#
# === Other Requirements
@Ancillas
Ancillas / site.pp
Created January 18, 2013 20:18
A very simple Puppet example of setting the authorized_keys, id_rsa, and sudoers file for passwordless sudo access.
node default {
class {'passwordlessroot':
publickey => "public",
privatekey => "private",
}
}
class passwordlessroot(
$publickey,
$privatekey
@Ancillas
Ancillas / index.html
Created January 17, 2013 07:58
An example HTML file to demonstrate source code highlighting.
<!DOCTYPE html>
<html>
<head>
<title>Example HTML Code</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div class="obnoxious">Blam!</div>
</body>