Skip to content

Instantly share code, notes, and snippets.

View 9re's full-sized avatar

Taro Kobayashi 9re

View GitHub Profile
(function() {
var tweets = [];
$('div.content').map(function(_,d){
d = $(d);
var img = d.find('img.js-action-profile-avatar')[0];
var screen_name = $(d.find('span.username > b')[0]).text();
var detail_url = $(d.find('small > a')[0]).attr('href');
detail_url = detail_url || "";
detail_url = detail_url.replace('/' + screen_name + '/status/', '');
var time = $(d.find('small > a > span')[0]).attr('data-time');
@9re
9re / README.md
Last active August 29, 2015 14:07
http-proxy-server
(function () {
var id = (function () {
var i, l, q, div, el, qs;
el = document.getElementsByTagName('SCRIPT');
el = el[el.length-1];
qs = el.src.split('?').pop().split('&');
l = qs.length;
for (i=0; i<l; i++) {
q = qs[i].split('=');
if (q[0]=='id') {
@9re
9re / gist:754947
Created December 25, 2010 16:57
publish all the flas in the current directory
#!/usr/bin/perl
use strict;
use JSON qw/to_json/;
use IO::All;
use Cwd;
my @flas = ();
my @tempflas = grep {
@9re
9re / gist:755513
Created December 26, 2010 17:12
parse down MovieClip recursively
package
{
import flash.display.DisplayObject;
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.net.URLRequest;
@9re
9re / gist:833349
Created February 18, 2011 06:49
equal & hashCode
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
public class ListTest extends Activity {
public static class ModelUnsafe {
@9re
9re / Makefile
Created August 9, 2011 17:51
libcurl test
test: test.c
gcc -o test test.c -lcurl
@9re
9re / CopySharedPrefs.java
Created September 3, 2011 15:22
copying shared_prefs
import android.content.Context;
import android.os.Environment;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class CopySharedPrefs {
@9re
9re / revr.scm
Created September 21, 2011 16:22
re-construction of 'reverse' with only foldr and cons
(define (foldr f z ls)
(if (null? ls)
z
(f (car ls)
(foldr f z (cdr ls)))))
(define (revr ls)
((foldr (lambda (x f)
(lambda (a)
(f (cons x a))))
@9re
9re / ConflictTest-config.xml
Created October 5, 2011 03:08
as3corelib JSON conflicts with Native JSON class for FlashPlayer 11
<flex-config>
<swf-version>13</swf-version>
</flex-config>