Skip to content

Instantly share code, notes, and snippets.

View slattery's full-sized avatar

Mike Slattery slattery

View GitHub Profile
@slattery
slattery / README.md
Last active August 29, 2015 14:22
VBoxSnapshot: take periodic snaps of your VMs

#VBoxSnapshot: rotating snaps of your Virtualbox VMs.

##USAGE

Usage: perl -s VBoxSnapshot.pl -p=[HOURLY|DAILY|WEEKLY|MONTHLY] -b=[VMNAME] (-v=num) (-d)
  -p    period  interval of time for rotation
  -b    box     vm to operate on
  -v    value   value of the interval for this snapshot (for testing only)
 -d debug print out syslog messages to screen
@slattery
slattery / README.md
Last active September 14, 2015 21:51
Allow OS X to accept udp incoming syslog

##on OSX

convert the plist to non-binary, then edit it to match sample file below, by adding network section

plutil -convert xml1  /System/Library/LaunchDaemons/com.apple.syslogd.plist
vi /System/Library/LaunchDaemons/com.apple.syslogd.plist
@slattery
slattery / strongloop-docker.sh
Created June 30, 2015 17:36
docker remote image grabber from strongloop
#!/bin/sh
SYSTEMCTL=/usr/bin/systemctl
INITCTL=/sbin/initctl
DOCKER=$(which docker)
INIT=none
STOP=
IMAGE=strongloop/strong-pm
CONTAINER=strong-pm-container
@slattery
slattery / README.md
Last active August 29, 2015 14:27
vboxboy: simple vbox start|stop|list bash script with autocomplete

##INSTALL This was written to be used in the bash aliases space. It is not a REPL.

##USAGE

vmlist
vmstart <vmname|uuid> [<vmname|uuid>]...
vmstop <vmname|uuid> [<vmname|uuid>]...
vmstopall
#!/bin/bash
# Execute as a bash file, so no copy-paste in your terminal please.
# clear meaningless config settings
git config --global --remove-section apply
# aliases for basic commands
git config --global alias.st status
git config --global alias.ci commit
@slattery
slattery / README.md
Last active August 29, 2015 14:27
reloading extension files for vbox

###Problem Mac OSX found powered off. After starting up Virtualbox apps and VMs would not launch.

###tl;dr When the VM fails instantly, try reloading the kernel extensions

###Efforts

Tried to start a VM on the command line.

Feature: Google Demo
Scenario: Google home page
When I open http://google.com
The the title should be Google
@slattery
slattery / google.feature
Last active September 10, 2015 12:09 — forked from kbingman/google.feature
A basic test runner to use Yadda with the Nightwatch selenium testing framework.
Feature: Google Demo
Scenario: Google home page
When I open http://google.com
and I should see #viewport
kFSEventStreamCreateFlagNone = 0x00000000
kFSEventStreamCreateFlagUseCFTypes = 0x00000001
kFSEventStreamCreateFlagNoDefer = 0x00000002
kFSEventStreamCreateFlagWatchRoot = 0x00000004
kFSEventStreamCreateFlagIgnoreSelf = 0x00000008
kFSEventStreamCreateFlagFileEvents = 0x00000010
@slattery
slattery / vmtouchpoll
Created December 15, 2015 15:50 — forked from vi/vmtouchpoll
Keep files locked in memory by periodically restarting vmtouch
#!/bin/bash
# vmtouchpoll: Keep some files locked in memory (including new files, dropping deleted files)
# Usage: vmtouchpoll '/path/to/some/files/*.idx'
# Works by periodically restarting vmtouch with a new set of files
# Implemented by Vitaly "_Vi" Shukela in 2015, License=MIT