Skip to content

Instantly share code, notes, and snippets.

View jasonm23's full-sized avatar

Jason Milkins jasonm23

View GitHub Profile
@jasonm23
jasonm23 / list.csv
Created May 28, 2010 04:10
Adrian Parr's List of AS3 Libraries - filtered
@jasonm23
jasonm23 / sparklist.rb
Created May 28, 2010 05:34
Spark project AS3 library list

Spark project AS3 library list

Graphics/Color (AS3)

@jasonm23
jasonm23 / key_bindings.sh
Created June 1, 2010 12:36
zsh binding delete key
bindkey '^[[3~' delete-char
#!/bin/bash
# read a list of urls and find code resource related keywords.
# url list via stdin.
while read a; do
echo @@@$a
curl -s $a | grep -E 'svn|swc|zip|git|download|source'
echo @@@END
done
h1. Papervision3D ::curl http://blog.papervision3d.org/
<link rel="shortcut icon" type="image/x-icon" href="http://www.gravatar.com/blavatar/910a9f52f167f9b7cebf4f617c2e29e9?s=16&#038;d=http://s2.wp.com/i/favicon.ico" />
<link rel="icon" type="image/x-icon" href="http://www.gravatar.com/blavatar/910a9f52f167f9b7cebf4f617c2e29e9?s=16&#038;d=http://s2.wp.com/i/favicon.ico" />
<link rel="apple-touch-icon" href="http://www.gravatar.com/blavatar/23e19631d006200351ce203fb2b47175?s=158&#038;d=http://s0.wp.com/wp-content/themes/h4/i/webclip.png" />
<div class='snap_preview'><p><a href="http://events.q-dance.nl/2010-06_12-juni_defqon1/" target="_blank"><img src="http://papervision3d.files.wordpress.com/2010/04/defqonthumb.jpg?w=447&#038;h=312" alt="" title="Defqon.1" width="447" height="312" class="alignnone size-full wp-image-991" /></a></p>
<p>Monty Python meets MadMax in this fully interactive journey. <a href="http://www.hanazuki.com" target="_blank">Hanazuki</a> studio created this trippy experience websit
#!/bin/bash
cat gproj | while read a
do
b=$(echo $a | sed 's/.*com\/p\/\(.*\)\//\1/');
c=http://$b.googlecode.com/svn/trunk;
curl -s -o tempcurl $a
lic=$(cat tempcurl | grep "Code license" | sed 's/Code license.*">\([^<]*\).*/\1/' | sed 's/<b>//')
echo "{ :name => \"${b}\", :licence => \"${lic}\", :homeurl => \"${a}\", :svnurl => \"${c}\", :sourcepath => \"$(svn ls $c | egrep -i 'src|source')\" },"
done
@jasonm23
jasonm23 / gist:439995
Created June 16, 2010 01:36
Hpricot notes

Hpricot, Read Any HTML

Hpricot is a fast, flexible HTML parser written in C. It's designed to be very accommodating (like Tanaka Akira's HTree) and to have a very helpful library (like some JavaScript libs -- JQuery, Prototype -- give you.) The XPath and CSS parser, in fact, is based on John Resig's JQuery.

Also, Hpricot can be handy for reading broken XML files, since many of the same techniques can be used. If a quote is missing, Hpricot tries to figure it out. If tags overlap, Hpricot works on sorting them out. You know, that sort of

http://inspiration.sweyla.com/code/seed/n
where n = the number in brackets.
InspirationQ (675196)
InspirationAltos (819868)
InspirationAmbia (965166)
InspirationBlindLemon (670374)
InspirationCamo (939424)
InspirationHelloKitty (829772)
require 'rubygems'
require 'html2markdown'
first_block = <<END
<div id="wikicontent" style="padding:0 3em 1.2em 0">
<p><img src="http://cjcat2266.googlepages.com/Emitterlogo.png"> </p><h1><a name="Emitter_is_now_version_2.1">Emitter is now version 2.1</a><a href="#Emitter_is_now_version_2.1" class="section_anchor">¶</a></h1><p><a href="http://emitter.googlecode.com/svn/trunk/docs/index.html" rel="nofollow">Documentation</a> </p><p><a href="http://cjcat.blogspot.com/2009/06/using-tortoisesvn-to-check-out-files.html" rel="nofollow">How to check out the latest source files from the SVN repository</a> </p><hr><h2><a name="Emitter_Video_Tutorials_are_now_available_on_!!">Emitter Video Tutorials are now available on YouTube!!</a><a href="#Emitter_Video_Tutorials_are_now_available_on_!!" class="section_anchor">¶</a></h2><p><a href="http://www.youtube.com/view_play_list?p=84AC3DE6772538E4" rel="nofollow"><img src="http://www.sabredefence.com/images/youtube_logo.gif"></a> </p><p>Check out the complete playlist <a hr
Library.find(:all, :conditions => {:host => "http://code.google.com"} ).each do |lib|
h = Hpricot(open(lib.homepage))
p = HTMLToMarkdownParser.new
p.feed((h/"#wikicontent").to_s)
lib.description = p.to_markdown
lib.update
end