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.io.File | |
import scala.io.Source | |
import scala.util.matching.Regex | |
import scala.util.parsing.combinator._ | |
import scala.util.parsing.input.{Position, NoPosition} | |
sealed abstract class Insn extends ( CED => CED ){ | |
val pos:Position | |
} | |
case class App( m:Int, n:Int, pos:Position ) extends Insn{ |
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
// javascript:(function(){(function()%20{%20var%20content%20=%20$(%27.content%27);%20var%20room%20=%20{%20creator:%20content.find(%27.creator%27).text(),%20description:%20content.find(%27.description%27).text(),%20recent_songs:%20content.find(%27.songlog%20.song%27).map(function()%20{%20var%20song%20=%20$(this);%20return%20{%20thumb:%20song.find(%27.thumb%27).attr(%27src%27)%20||%20%27%27,%20title:%20song.find(%27.title%27).text(),%20details:%20song.find(%27.details%20div%27).first().text(),%20score:%20song.find(%27.details%20.score%27).text()%20};%20}).toArray()%20};%20var%20json%20=%20JSON.stringify(room,%20null,%202);%20$(document.createElement(%27div%27)).dialog({draggable:%20false})%20.prev().css({backgroundColor:%20%27#E4BD33%27})%20.append($(document.createElement(%27textarea%27))%20.attr({cols:%2040,%20rows:%2020})%20.val(json));})();})() | |
(function() { | |
var content = $('.content'); | |
var room = { | |
creator: content.find('.creator').text(), | |
description: content.find('.description').text(), | |
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
# -*- coding: utf-8 -*- | |
require 'rubygems' | |
require 'thor' | |
class Passgen < Thor | |
TABLE = { | |
:number => (0x30...0x3A).map(&:chr), # 0123456789 | |
:upper => (0x41...0x5b).map(&:chr), # ABCDEFGHIJKLMNOPQRSTUVWXYZ | |
:lower => (0x61...0x7b).map(&:chr), # abcdefghijklmnopqrstuvwxyz |
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
// https://twitter.com/settings/design でブラウザのURL入ってるとこに入れて保存する | |
// サイドバーと背景は透明になるけど流石にfontは消えなかった。transparentとか指定しても弾かれる | |
javascript:d=document;d.getElementById("user_profile_sidebar_fill_color").value = '';d.getElementById("user_profile_sidebar_border_color").value = '';d.getElementById("user_profile_text_color").value = '';d.getElementById("user_profile_background_color").value = '';d.getElementById("user_profile_link_color").value = '';void(0); |
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
// ==UserScript== | |
// @name A smart dashboard have my id | |
// @namespace http://mitukiii.jp/ | |
// @description TumblrのDashboardで自分からReblogされた/自分のidを含んだpostを折り畳むスクリプト | |
// @include http://www.tumblr.com/dashboard* | |
// @author mitukiii | |
// @compatibility Firefox 5.0(Scriptish 0.1), Chrome 12.0.742.112, Opera 11.50 | |
// @charset UTF-8 | |
// @version 0.0.2.20110707180600 | |
// ==/UserScript== |
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 Object | |
def to_php | |
self.inspect.gsub( /[\[{]/, 'array(' ).gsub( /[}\]]/, ')' ) | |
end | |
end |
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
# -*- coding: utf-8 -*- | |
## | |
## requiements | |
## sinatra, padrino, haml, oauth | |
## install | |
## $ gem install sinatra padrino haml oauth | |
## usage | |
## $ rackup tumblrauth.rb | |
## |
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 'oauth' | |
require 'json' | |
require 'cgi' | |
class Tumblr4r | |
def initialize(access_token) | |
@access_token = access_token | |
end | |
def api_key |
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
#coding: utf-8 | |
require 'twitter' | |
Twitter.configure do |config| | |
config.consumer_key = YOUR_CONSUMER_KEY | |
config.consumer_secret = YOUR_CONSUMER_SECRET | |
config.oauth_token = YOUR_OAUTH_TOKEN | |
config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET | |
end |
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
$("a.next-tweet-button").click(function() { | |
event.preventDefault(); | |
var self = $(this); | |
$.ajax({ | |
url: self.attr('href') | |
}) | |
.success(function(data) { | |
var tweets = $(data).find('.tweet'); | |
$('#tweet-container').append(tweets); | |
}) |