Skip to content

Instantly share code, notes, and snippets.

@oogali
oogali / begs.rb
Created December 29, 2010 00:22
be.gs irc bot
#!/usr/bin/env ruby
require 'rubygems'
require 'isaac'
require 'em-http-request'
require 'uri'
configure do |c|
c.nick = 'begs'
c.server = 'irc'
@oogali
oogali / tmbo.sh
Created January 8, 2011 03:39
tmbo command-line uploader
#!/bin/sh
## tmbo.sh -- my attempt at posting from the command line
## tmbo: lnk, twitter: @oogali
##
BASE_URL=thismight.be/offensive
TMBO_CONFIG=${HOME}/.tmbo
TMPPATH=/tmp
usage() {
echo "$0 <options> <image to upload> [filename]"
@oogali
oogali / gen-iface-names.sh
Created January 13, 2011 23:24
Generate interface DNS names for your rooters.
#!/bin/sh
# router name generator
# [ omachonu ogali / oogali at blip dot tv / @oogali ]
#
# README:
# 1. point at your router with a community
# 2. finesse names as needed into your DNS zones
# 3. have a cold beverage of your choosing.
#
@oogali
oogali / corkboard.sh
Created January 13, 2011 23:29
Shell script interface to corkboard.me
#!/bin/sh
## corkboard.me shell script interface
## -- omachonu ogali / @oogali
##
## hi tim!
##
## still a work in progress, i still need to finish the note
## positioning stuff. comments appreciated.
## -oo
@oogali
oogali / cute-domain-search.sh
Created January 13, 2011 23:31
A way to search for "cute" domains, without blowing through WHOIS usage limits
#!/bin/sh
# "Cute" domain search -- < oogali AT gmail.com >
#
# Example:
# [oogali@illusion ~]$ ./cute-domain-search am 2
# IL.AM IS AVAILABLE
# LE.AM IS AVAILABLE
# LY.AM IS AVAILABLE
# OG.AM IS AVAILABLE
# OL.AM IS AVAILABLE
@oogali
oogali / should-we-anycast.sh
Created January 13, 2011 23:32
Spin BIRD up or down depending on the state of DNS
#!/bin/sh
## should we anycast?
## - WHAT? a brief script that will spin bird up or down, based on
## results from a dns test.
##
## - WHY? because if our dns server falls down, we don't want a dns
## blackhole for our querying users
##
## omachonu ogali // oogali@gmail.com // @oogali
@oogali
oogali / start-jnpr-vpn.sh
Created January 13, 2011 23:34
Shell script to connect to Juniper SSL VPNs w/o need for a browser or Java
#!/bin/sh
##
## netscreen/jnpr ssl vpn connection magic
## oogali@idlepattern.com / @oogali
##
## i wrote this about a year ago (2009), when i had continuous access
## to a jnpr ssl vpn box and had to connect via it.
##
## if bits of this script are broken, i'll be glad to fix if someone
## gives me client access to a ssl vpn box to test against.
@oogali
oogali / peering-autogen.html
Created January 31, 2011 17:39
Self-contained HTML + JS to generate peer configurations
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!--
Self-contained peering template generator
=========================================
I like to code.
I like my peering definitions to have some sort of consistency.
@oogali
oogali / gist:836604
Created February 21, 2011 02:47
Quick directory listing
#!/usr/bin/env ruby
while dir = ARGV.shift do
entries = Array.new
dir += '/'
Dir.foreach(dir) { |entry| entries.push entry }
entries.sort.each do |entry|
fn = dir + entry
s = File::stat fn
@oogali
oogali / bird.conf
Created February 23, 2011 20:25
Sample BIRDv4 configuration (looking glass)
log "/var/log/bird.log" all;
debug protocols all;
router id 172.16.31.131;
listen bgp address 172.16.31.131 port 179;
protocol device {
scan time 180;
}