Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
# beanstalkd - a simple, fast workqueue service
#
# chkconfig: - 57 47
# description: a simple, fast workqueue service
# processname: beanstalkd
# config: /etc/sysconfig/beanstalkd
#
@TomA-R
TomA-R / ec2-instance-subnet-id.md
Created November 15, 2017 05:02 — forked from samkeen/ec2-instance-subnet-id.md
Get the subnet and VPC id of a running EC2 instance

First get the Interface mac address, then use that to run the full command

INTERFACE=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/)
SUBNET_ID=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/${INTERFACE}/subnet-id)
VPC_ID=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/${INTERFACE}/vpc-id)

echo $SUBNET_ID
<?php
chdir('..');
$output = array();
exec('git log -15 --pretty=format:"%ad %an %s" --abbrev-commit --date=short', $output);
$history = array();
foreach ($output as $line) {
$commit = array();
@TomA-R
TomA-R / bongo.sh
Last active December 24, 2015 10:59 — forked from jmoiron/bongo.sh
#!/bin/bash
LOADING=false
while [ $# -gt 0 ] ; do
case "$1" in
-h|--help)
echo "usage: $package [options] dbname"
echo " "
echo "OPTIONS:"
<?php
// Clean argument values
$phpStormRunner = null;
$cleanedArgv = array();
foreach ($_SERVER['argv'] as $key => $value) {
if (strpos($value, 'ide-phpunit.php') === false) {
$cleanedArgv[] = $value;
} else {
$phpStormRunner = $value;
}