Skip to content

Instantly share code, notes, and snippets.

View jjasghar's full-sized avatar

JJ Asghar jjasghar

View GitHub Profile
#
# Cookbook Name:: Cookbook
# Spec:: default
#
require 'spec_helper'
describe 'cookbook::default' do
shared_examples_for :default_recipe do
[DEFAULT]
#
# From tempest.config
#
# Whether to disable inter-process locks (boolean value)
#disable_process_locking = false
# Directory to use for lock files. (string value)

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

#!/bin/bash
# exit on any error
set -o errexit
# A few tunable variables
NAME='atomic'
NAME='try'
#NAME='test'
#DISK='/guests/rhel-guest-image-7.1-20150224.0.x86_64.qcow2'
@jjasghar
jjasghar / create_vm.sh
Created May 18, 2012 19:44
Using Virtualbox to build throw away vms
#!/usr/local/bin/bash
VDI_DIR='/home/me/vdi/'
UBUNTU_GOLD_VDI="ubuntu_11_10_gold.vdi"
REDHAT_GOLD_VDI="centos_6_2_gold.vdi"
HOST_NIC="em0"
echo "Name of VM"
read name_of_vm
ಠ_ಠ Disapproval
(╯°□°)╯︵ ┻━┻ Flipped the table
┬──┬ ノ( ゜-゜ノ) Put the table back
t(-_-)t Both middle fingers up
..|..(~.')> Pissed off Kirby
@jjasghar
jjasghar / gist:3011904
Created June 28, 2012 15:10
stupid nethack
10:08:55 [h0m3ro] ~ $ nethack-console
[1]+ Stopped nethack-console
10:09:31 [h0m3ro] ~ $ sudo kill -9 nethack-console
ERROR: garbage process ID "nethack-console".
Usage:
kill pid ... Send SIGTERM to every process listed.
kill signal pid ... Send a signal to every process listed.
kill -s signal pid ... Send a signal to every process listed.
[default]
host = charlie.its.utexas.edu
index=bbdev
# Syslogs
[monitor:///var/log/messages]
index=syslog
# Secure logs
[monitor:///var/log/secure]
@jjasghar
jjasghar / gist:3101236
Created July 12, 2012 21:41
Redhat Linux Audit
#!/bin/bash
DATE=`date +%F`
HOSTNAME=`hostname -s`
EMAIL=me@hostname.com
uname -a >> /tmp/$HOSTNAME.$DATE.txt
echo "" >> /tmp/$HOSTNAME.$DATE.txt
uptime >> /tmp/$HOSTNAME.$DATE.txt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
=====================================================================
Red Hat Security Advisory
Synopsis: Moderate: sudo security update
Advisory ID: RHSA-2012:1081-01
Product: Red Hat Enterprise Linux
Advisory URL: https://rhn.redhat.com/errata/RHSA-2012-1081.html