Skip to content

Instantly share code, notes, and snippets.

View rgorsuch's full-sized avatar

Ryan Gorsuch rgorsuch

View GitHub Profile
# PUPPET CONFIG MANIFEST FOR IRF (Installs LAMP stack, tomcat8 and memcached)
# If you are running this locally on an agent, place this file in /etc/puppet/manifests and run puppet appy irf.pp --test
# execute 'apt-get update'
exec { 'apt-update': # exec resource named 'apt-update'
command => '/usr/bin/apt-get update' # command this resource will run
}
# install apache2 package
package { 'apache2':
use Term::ReadKey;
ReadMode 2;
print "# ";
chomp(my $phrase = <STDIN>);
print "\n" . join("", map { sprintf "\\%o", ord } split("", $phrase)) . "\n"
// ==UserScript==
// @name Splunk
// @namespace https://splunk:8000/en-US/account/
// @include https://splunk:8000/en-US/account/*
// @version 1
// @grant none
// ==/UserScript==
// perl -ne 'chomp; print join("", map { sprintf "\\%o", ord } split("", $_)) . "\n"'
// Run this, type your password, then ctrl+d
@rgorsuch
rgorsuch / gist:b404c658551a6a8aeb35
Created July 31, 2015 13:03 — forked from jessitron/gist:8376139
scala: print all URLs on classpath
def urlses(cl: ClassLoader): Array[java.net.URL] = cl match {
case null => Array()
case u: java.net.URLClassLoader => u.getURLs() ++ urlses(cl.getParent)
case _ => urlses(cl.getParent)
}
val urls = urlses(getClass.getClassLoader)
println(urls.filterNot(_.toString.contains("ivy")).mkString("\n"))