This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@victorduwon's: | |
Find: '(@[a-zA-Z0-9.-]+\\)' | |
Replace: '<a href=\"twitter.com/:\\1\">\\1</a>' | |
@damog's: | |
Find: '@(\w+)' | |
Replace "<a href=\"http://twitter.com/\1\">\1</a>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> pf = FeedParser.parse("http://feeds.feedburner.com/digitsshowonyoutube") | |
ArgumentError: wrong number of arguments (1 for 0) | |
from /opt/local/lib/ruby/gems/1.8/gems/rfeedparser-0.9.951.1/lib/rfeedparser/scrub.rb:201:in `initialize' | |
from /opt/local/lib/ruby/gems/1.8/gems/rfeedparser-0.9.951.1/lib/rfeedparser/scrub.rb:201:in `new' | |
from /opt/local/lib/ruby/gems/1.8/gems/rfeedparser-0.9.951.1/lib/rfeedparser/scrub.rb:201:in `SanitizerDoc' | |
from /opt/local/lib/ruby/gems/1.8/gems/rfeedparser-0.9.951.1/lib/rfeedparser/scrub.rb:208:in `sanitizeHTML' | |
from /opt/local/lib/ruby/gems/1.8/gems/rfeedparser-0.9.951.1/lib/rfeedparser/parser_mixin.rb:415:in `pop' | |
from /opt/local/lib/ruby/gems/1.8/gems/rfeedparser-0.9.951.1/lib/rfeedparser/parser_mixin.rb:475:in `popContent' | |
from /opt/local/lib/ruby/gems/1.8/gems/rfeedparser-0.9.951.1/lib/rfeedparser/parser_mixin.rb:1099:in `_end_description' | |
from /opt/local/lib/ruby/gems/1.8/gems/rfeedparser-0.9.951.1/lib/rfeedparser/parser_mixin.rb:223:in `send' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class ArrayIterator<E> implements Iterator<E> { | |
private final E[] array; | |
private final int count; | |
private int cursor = 0; | |
public ArrayIterator(E[] contents, int ccount) { | |
array = contents; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OddityTest { | |
public static boolean isItOdd(int i) { | |
return i % 2 == 1; | |
} | |
public static boolean isItReallyOdd(int i) { | |
return i % 2 != 0; | |
} | |
public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//******************************************************************** | |
// QueueADT.java Authors: Lewis/Chase | |
// | |
// Defines the interface to a queue collection. | |
//******************************************************************** | |
package jss2; | |
public interface QueueADT<T> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package weiss.nonstandard; | |
// ArrayStack class | |
// | |
// CONSTRUCTION: with no initializer | |
// | |
// ******************PUBLIC OPERATIONS********************* | |
// void push( x ) --> Insert x | |
// void pop( ) --> Remove most recently inserted item | |
// AnyType top( ) --> Return most recently inserted item |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> require "rubygems" | |
=> true | |
>> require "feedbag" | |
=> true | |
>> Feedbag.find "stereonaut.net" | |
=> ["http://stereonaut.net/feed", "http://stereonaut.net/tag/feed/", "http://stereonaut.net/comments/feed/"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ $ feedbag cnn.com | |
== cnn.com: | |
- http://rss.cnn.com/rss/cnn_topstories.rss | |
- http://rss.cnn.com/rss/cnn_latest.rss |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# shamelessly taken from: http://webcache.googleusercontent.com/search?q=cache:aUG0MH-OLaEJ:codesnippets.joyent.com/posts/show/1954+spotify+ichat&cd=1&hl=en&ct=clnk&gl=us&source=www.google.com | |
# messages have this format: | |
# 'Mon Jul 5 13:25:05 azeef-macbook GrowlHelperApp[46245] <Warning>: Spotify: Do the Buildings and Cops Make You Smile? (Bedroom Walls\nThe 4400) - Priority 0' | |
# which this script extracts as: | |
# 'Spotify: Do the Buildings and Cops Make You Smile? (Bedroom Walls' | |
# 'The 4400)' | |
# or (a little more abstract): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.010; | |
use open qw(:locale); | |
use strict; | |
use utf8; | |
use warnings qw(all); | |
use Mojo::UserAgent; | |
# FIFO queue |