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"); |
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 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
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
/*============================= | |
* 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
/* | |
* 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
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
create table size_m as select i as id, repeat(i::text, i % 100) as val from generate_series(1, 20000) i; | |
create table size_l as select i as id, m.id as m_id, repeat(i::text, i % 100) as val from generate_series(1, 1000000) i, size_m m where i.i / 10 = m.id; | |
--create index idx_m_id on size_l (m_id); | |
analyze size_m; | |
analyze size_l; | |
---- |
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
#!/bin/bash | |
base=$1 | |
version=$2 | |
if [ -z "$base" -o -z "$version" ] | |
then | |
echo "Usage $0 <base> <version>" | |
else | |
rm -f ~/local/$base |
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
#!/bin/bash | |
VERSION=`pwd | perl -ne 's/.+postgresql-([^\/]+).*/$1/;print'` | |
./configure CC="ccache gcc" CFLAGS=-pthread --prefix=$HOME/local/pgsql-$VERSION --enable-debug --enable-cassert | |
# planner dev | |
#./configure OPTIMZER_DEBUG=1 CFLAGS=-pthread --prefix=$HOME/local/pgsql-$VERSION --enable-debug --enable-cassert | |
# mac | |
#./configure CC="ccache gcc" CFLAGS='-pthread -arch x86_64' --prefix=$HOME/local/pgsql-$VERSION --enable-debug --enable-cassert --with-python |
OlderNewer