Skip to content

Instantly share code, notes, and snippets.

View arusso's full-sized avatar

Aaron Russo arusso

View GitHub Profile
WAIT_TIME=15 # in minutes
OUT=`find . -mmin -${WAIT_TIME} | grep restart`
if [ "$OUT" == "" ]; then
# we haven't committed murder in $WAIT_TIME minutes, lets do it again
/bin/kill -f `ps ux -W | grep srcd | awk '{print $1}'`
# touch our breadcrumb
touch restart
fi
@arusso
arusso / main.cc
Created June 18, 2012 00:43
simple calculator
#include <iostream>
#include <string>
using namespace std;
// Function Declarations
int get_value(string msg);
char get_operator(string msg);
int compute(int lhs, int rhs, char op);
@arusso
arusso / java-1.6.0-ibm
Created September 19, 2012 05:06
RPM Provides for Java 1.6.0
[root@eu-puppet-dev-01 ~]# rpm -q --provides java-1.6.0-ibm
jre-1.6.0-ibm = 1:1.6.0.11.0-1jpp.1.el6_3
jre-ibm = 1:1.6.0.11.0-1jpp.1.el6_3
jre-1.6.0
java-1.6.0
jre = 1:1.6.0
java-ibm = 1:1.6.0.11.0-1jpp.1.el6_3
java = 1:1.6.0
javaws = 1.6.0
jndi = 1:1.6.0.11.0
@arusso
arusso / 10_passenger.conf
Created October 24, 2012 16:01
Passenger Config
# /etc/httpd/conf.d/10_passenger.conf
# Load passenger module
LoadModule passenger_module /usr/lib64/httpd/modules/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12
PassengerRuby /usr/bin/ruby
# some recommended settings for puppet
PassengerHighPerformance on
PassengerUseGlobalQueue on
@arusso
arusso / VagrantFile
Created December 19, 2012 23:03
Aaron's Vagrant File
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.provision :puppet, :module_path => "modules"
config.vm.define :blank do |node_config|
node_config.vm.box = "centos6-eu"
end
@arusso
arusso / output
Last active December 12, 2015 04:08
value 0
value 1
value 2
value 3
@arusso
arusso / update-java-1.7.0-oracle.pp
Created March 27, 2013 19:00
Update hosts to use java-1.7.0-oracle via Puppet
# Ensure Java 1.7 is installed
package { 'java-1.7.0-oracle': ensure => installed }
# update alternatives only if it's not set correctly already
exec { 'alternatives --set java \
/usr/lib/jvm/jre-1.7.0-oracle.x86_64/bin/java':
unless => "test $(readlink /etc/alternatives/java) == \
'/usr/lib/jvm/jre-1.7.0-oracle.x86_64/bin/java'",
require => Package['java-1.7.0-oracle'],
path => ['/bin','/usr/sbin','/usr/bin'],
@arusso
arusso / host.cnf.erb
Created April 1, 2013 17:12
Host CNF file for certificate request generation. Includes support for SAN certs
[ req ]
default_bits = 2048
default_md = sha1
distinguished_name = req_distinguished_name
prompt = no
<% if @alt_names_real.count > 1 -%>
x509_extensions = v3_ca # The extentions to add to the self signed cert
req_extensions = v3_req # The extensions to add to a certificate request
<% end -%>
@arusso
arusso / Vagrantfile
Created June 10, 2013 00:25
Vagrant Setup
# -*- mode: ruby -*-
# vi: set ft=ruby :
home = File.dirname(__FILE__)
# Primary VagrantFile
# handles the setting up of our puppetmaster
# Define our default box, in case we dont override it in the VagrantInit
# file. We'll also add our puppet hosts entry
@arusso
arusso / urgent-flag-allow.cisco
Last active August 29, 2015 13:57
An example configuration that tells the tcp-normalization engine on Cisco ASA appliances to allow the urgent flag for traffic that matches an access list.
!
! setup an ACL that matches hosts whose urgent flag is to be left untouched
! through the ASA Firewall. This could probably be limited to a particular port
! if we so chose.
!
access-list extended acl_permit_urgent_flag permit <host/network> <netmask>
!
! create a tcp-map (packet normalization policy) that allows the urgent-flag through
! identified packets