Skip to content

Instantly share code, notes, and snippets.

View ussjoin's full-sized avatar

Brendan O'Connor ussjoin

View GitHub Profile
--- Steam.pm 2009-06-26 19:58:32.000000000 -0400
+++ NewSteam.pm 2009-07-08 18:55:12.000000000 -0400
@@ -40,7 +40,9 @@
my $achv_scraper = scraper {
process q{div#BG_top h2},
'title' => 'TEXT';
- process q{//div[@class='achievementClosed']},
+ process q{html},
+ 'html' => 'HTML';
+ process q{//div[@class='achieveTxtHolder']},
import java.util.regex.*;
public class Test
{
public static void main(String[] args)
{
String haystack = "<html><head><title>The Title</title></head><body>Some words are here</body></html>";
String stripHTMLPattern = "<[^>]*>";
Pattern pattern = Pattern.compile(stripHTMLPattern);
import java.util.regex.*;
public class Test
{
public static void main(String[] args)
{
String haystack = "<script>Bad</SCRIPT>Good";
String stripHTMLPattern = "<script>.+?</script>";
import java.util.regex.*;
public class Test
{
public static void main(String[] args)
{
String haystack = "<script>Bad</SCRIPT>Good";
String stripHTMLPattern = "<script.+?</script>";
# Getting the most recent, and 800th most recent, Tweets from my timeline
wget "http://twitter.com/statuses/friends_timeline.atom?count=200&page=1" --http-user=XXX --http-password=XXX
wget "http://twitter.com/statuses/friends_timeline.atom?count=200&page=4" --http-user=XXX --http-password=XXX
@ussjoin
ussjoin / gist:192516
Created September 24, 2009 04:43
Script to calculate how many bytes of text I eat per day from my Google Reader subscriptions.
# Script to calculate how many bytes of text I eat per day from my Google Reader
# subscriptions.
use strict;
use XML::Feed;
open(OPML, "<google-reader-subscriptions.xml");
my @lines = <OPML>;
close(OPML);
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>USSJoin subscriptions in Google Reader</title>
</head>
<body>
<!--
Blogs I read of personal friends-- Philosophy Walker (AW '04), Yujie Wang, etc.
@ussjoin
ussjoin / gist:709150
Created November 21, 2010 21:00
Draw Antenna Locations
import processing.opengl.*;
String[] lines;
void setup()
{
size(1024,768, OPENGL);
lines = loadStrings("CO.dat");
noLoop();
}
@ussjoin
ussjoin / gist:709152
Created November 21, 2010 21:00
Ham Radio Visualization
import processing.opengl.*;
HashMap<String, String> date = new HashMap<String, String>();
HashMap<String, String> license = new HashMap<String, String>();
HashMap<String, Integer> zip = new HashMap<String, Integer>();
float[][] ziplookup = new float[100000][2];
int[] zipbucket = new int[100000];
void setup()
{

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.