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
#!/usr/bin/perl | |
while(1) { | |
foreach(<*(1)*>) { | |
next if (/\.crdownload$/); | |
/(\S+)\s?\(\d\)(\.[^\.]+)?$/; | |
$new_name = "$1$2"; | |
if (rename($_, $new_name)) { print "$_ -> $new_name\n"; } | |
#else { print STDERR "failed to rename: $_"; } | |
} | |
sleep(1); |
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
#IfWinActive ahk_class OperaWindowClass | |
{ | |
^k::Send {F8} ; Search | |
^Tab::Send ^{F6} ; Next tab | |
^PgUp::Send ^{F6} | |
^+Tab::Send ^+{F6} ; Prev tab | |
^PgDn::Send ^+{F6} | |
} |
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
#!/usr/bin/perl | |
use strict; | |
my $idx = 0; | |
my @preopt = ("-H", "-L", "-P"); | |
my $command = "find"; | |
my $regex_type = " -regextype posix-egrep"; | |
# check @preopt | |
for (; $idx <= $#ARGV; $idx++) { |
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
document.title = "PARTAKE: " + document.body.getElementsByTagName("h1")[0].innerText; | |
// binary is here: http://www.moccos.info/_files/13/PartakeTitleCorrector.zip |
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
open System | |
open System.Drawing | |
open System.Windows.Forms | |
// Configuration | |
let nGrid = 12 | |
let gridSize = 30 | |
let stoneSize = gridSize - 2 | |
let fieldMargin = 10 | |
let fieldEdgeMax = fieldMargin + nGrid * gridSize |
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
host = '127.0.0.1' | |
port = 9199 | |
name = 'test' | |
import jubatus | |
from jubatus.classifier.types import datum | |
client = jubatus.Classifier(host, port) | |
train_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
function(e) { | |
// ... | |
form.target = e.ctrlKey ? "_blank" : ""; | |
form.acrion = url; | |
form.submit(); | |
} |
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
if (e.shiftKey) { | |
var target = Math.random().toString(); | |
form.target = target; | |
window.open("about:blank", target).focus(); | |
} | |
// ... | |
form.submit(); |
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
type OptionReturnBuilder() = | |
member __.Bind(opt, expr) = opt |> function | |
| Some x -> Some x | |
| None -> expr opt | |
member __.Return(x) = x | |
member __.ReturnFrom(x) = x | |
member __.Delay(f): option<_> = f () | |
let optionr = OptionReturnBuilder() |
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
#include <stdio.h> | |
#include <tchar.h> | |
#include <Windows.h> | |
#include <wincon.h> | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
TCHAR *lbuf = L"I love beef!\n"; | |
CHAR *buf = "I love pork!\n"; | |
HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE); |
OlderNewer