Skip to content

Instantly share code, notes, and snippets.

// Download the twitter4j jar:
// wget http://twitter4j.org/maven2/org/twitter4j/twitter4j-core/4.0.4/twitter4j-core-4.0.4.jar
// Fill out the key/token/secrets
// Run the script
// kotlinc -script -classpath ./twitter4j-core-4.0.4.jar who_posts_the_most.kts|sort -n
import twitter4j.Status
import twitter4j.Twitter
import twitter4j.TwitterException
import twitter4j.TwitterFactory

Typically you run a batch non-progressively like this:

batch_set($batch);
$batch = &batch_get();
$batch['progressive'] = FALSE;
batch_process();

But this does not work when running inside a SimpleTest. At least for SimpleTest via the UI, it runs in a batch itself. So messing with batch_set() and batch_get() here causes the SimpleTest batch runner to lose itself. Thankfully with one method we can easily run a batch from inside a SimpleTest:

@webchick
webchick / gist:85e02f6c2f96d38f6c0a
Last active September 25, 2015 14:40
I <3 (3)DS

(3)DS is the best system EVER! I love it soooo much. Here are some of my favourite games and why.

Note: Check out http://www.metacritic.com/browse/games/release-date/available/3ds/metascore and http://www.metacritic.com/browse/games/release-date/available/ds/metascore as well. You might have more variety in your game choices than I do, and there are lots of other games rated in the 80s+.

ACTION / ADVENTURE

  • The Legend of Zelda: A Link Between Worlds: This game is sooooo good. Totally reminds me of SNES-style Zelda, and unlike most of the O&@#ing Zelda games on 3DS / DS, this one is an original game and not a remake.
  • Various DS Castlevania games (not the 3DS one! That one SUCKS!): Horror / exploration. You're in an enormous castle and need to find your way around, but certain paths are blocked off to you until you beat bosses and then obtain a new power like, say, the ability to slide into narrow passages. If you ever played Super Metroid or Super Castlevania on SNES, that's
@robinsloan
robinsloan / langoliers.rb
Last active June 25, 2024 17:12
The Langoliers, a tweet deletion script
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from dev.twitter.com
CONSUMER_KEY = "your_consumer_key"