This file contains 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 scala.io._ | |
import scala.util.parsing.json._ | |
object Sca2Main { | |
def main(args: Array[String]){ | |
val url = "http://search.twitter.com/search.json?q=umitanuki" | |
val parsed = JSON.parseRaw(Source.fromURL(url).getLines.mkString) | |
parsed match{ | |
case Some(x:JSONObject) => println("object") | |
case Some(y:JSONArray) => println("array") |
This file contains 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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package scalaapplication1 | |
object Main { | |
def lv2(s1:String, s2:String, n1:Int, n2:Int):Int = { |
This file contains 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
/*============================= | |
* upperCase.ms | |
==============================*/ | |
#command upperCaseKeyword "Keyword" | |
var FgKeyword = 8; | |
switch(command){ | |
case "upperCaseKeyword": | |
upperCaseKeyword(); |
This file contains 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
Const olFolderInbox = 6 | |
Const ForWriting = 2 | |
Const MessageID = 1709179138 | |
Const PR_INTERNET_MESSAGE_ID = &H1035001E | |
Set fs = WScript.CreateObject("Scripting.FileSystemObject") | |
Set ofile = fs.OpenTextFile("c:\tmp\mail.tsv", ForWriting) | |
Set ol = WScript.CreateObject("Outlook.Application") | |
Set myNameSpace = ol.GetNameSpace("MAPI") |
This file contains 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 Hacker News => target="_blank" | |
// @namespace umitanuki | |
// @include http://news.ycombinator.com/ | |
// ==/UserScript== | |
(function(){ | |
var ary = document.getElementsByClassName("title"); | |
for(var i=0, l=ary.length; i<l; i++){ | |
var as = ary[i].getElementsByTagName("a"); |
This file contains 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
from twisted.internet import reactor | |
from twisted.internet.protocol import Factory, Protocol, ClientFactory | |
import sys | |
HOST = 'servername' | |
class ClientProtocol(Protocol): | |
def dataReceived(self, data): | |
self.server_protocol.transport.write(data) |
This file contains 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 Google no tracking | |
// @namespace umitanuki | |
// @description Disable Googe's search page tracking handlers | |
// @include http://www.google.co.jp/search* | |
// @include http://www.google.com/search* | |
// ==/UserScript== | |
(function(){ | |
var ary = document.getElementsByClassName("l"); |
NewerOlder