Skip to content

Instantly share code, notes, and snippets.

@fluxrad
fluxrad / sshrm.sh
Created September 9, 2013 19:02
A function definition to quickly remove host+key entries from .ssh/known_hosts. Useful for when a node is replaced, or you otherwise need to remove a group of hosts.
# Remove any entries from SSH known_hosts file
# that match the specified string.
sshrm () {
node=$1
echo "Removing $node from SSH known hosts"
sed -i '.bak' -e "/^$node/d" ~/.ssh/known_hosts
}
@fluxrad
fluxrad / projects.md
Created January 16, 2013 18:25
Random project ideas or "Cool shit that needs to happen."

Projects that totally need to happen

  • People need to know when a Turntable room is active - use case: companies that have employees who like to jam out together. Idead: An IFTTT channel or a job that contacts a group of subscribers when a Turntable.fm room is active/updated.
@fluxrad
fluxrad / pre-commit
Created April 11, 2012 19:04
A pre-commit git hook to validate puppet syntax
#!/bin/bash
# pre-commit git hook to check the validity of a puppet manifest
#
# Prerequisites:
# gem install puppet-lint puppet
#
# Install:
# /path/to/repo/.git/hooks/pre-comit
# Source RVM if needed
@fluxrad
fluxrad / some_user.rb
Created November 1, 2011 21:52
Facter fact to test for a user
require 'facter'
Facter.add("some_user") do
setcode do
system "/usr/bin/id someuser >/dev/null 2>&1"
end
end