Skip to content

Instantly share code, notes, and snippets.

View PatrickBirchall's full-sized avatar

Patrick Birchall PatrickBirchall

View GitHub Profile
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)

Keybase proof

I hereby claim:

  • I am oreckz on github.
  • I am oreckz (https://keybase.io/oreckz) on keybase.
  • I have a public key ASAzN8t8Ifr3aeZdadamQNWUA0Y4yT84Ms02BAQ8vdDj2wo

To claim this, I am signing this object:

@PatrickBirchall
PatrickBirchall / tsung_gen.sh
Last active August 29, 2015 14:24
Tsung config generator
#!/bin/bash
# XML Request generator for Tsung
#Takes url as an argument and scrapes it for links
url=$1
xidel $url -e 'links:=//a/@href' > t.urls
#Cleans up any links we dont want
grep -v "links\|github\|google\|twitter\|mailto" t.urls > tmp.urls
mv tmp.urls t.urls
rm -f tmp.urls