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
use strict; | |
use warnings; | |
use utf8; | |
print sub { | |
my %arg = @_; | |
my ($k, $v, $in) = | |
($arg{keyword}, $arg{value}, $arg{input}); | |
my $i = index($in, $k); | |
if($i == -1) { | |
return $in; |
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 'flymake) | |
(setq flymake-growl-warning-priority 1) | |
(setq flymake-growl-error-priority 2) | |
(setq flymake-growl-warning-sticky t) | |
(setq flymake-growl-error-sticky t) | |
(setq flymake-growl-sticky-list nil) |
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
call :HOGE %0 && ftp -s:%0:ftp | |
goto :EOF | |
:HOGE | |
echo prompt > %1:ftp | |
echo open ftp.ring.gr.jp >> %1:ftp | |
echo anonymous>> %1:ftp | |
echo.>> %1:ftp | |
echo get index-j.html>> %1:ftp |
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
use strict; | |
use warnings; | |
use utf8; | |
use Test::More; | |
use Encode::Locale; | |
use Encode; | |
my $eco = find_encoding($Encode::Locale::ENCODING_CONSOLE_OUT); | |
diag($Encode::Locale::ENCODING_CONSOLE_OUT); | |
=pod Windows + cp932環境で日本語のテストケース名を出力する例 |
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
package Hoge; | |
our $a = 1; | |
1; | |
package main; | |
use strict; | |
use warnings; | |
use Test::More; | |
our $a = 1; |
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
from mercurial import ui, hg | |
import re | |
import time | |
import math | |
import sys | |
DEBUG = 0 | |
repo = hg.repository(ui.ui(), sys.argv[1]) | |
message_matchers = re.compile('fix(es|ed)?|close(s|d)?', re.IGNORECASE) |
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 test | |
// @namespace http://d.hatena.ne.jp/karronoli | |
// @description add nicovideo info to b.hatena.ne.jp/video | |
// @include http://b.hatena.ne.jp/video | |
// @version 1.0 | |
// ==/UserScript== | |
(function () { | |
"use strict"; |
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
@rem call cmd.exe /v:on /c "cmd.exe /c c.bat & echo HOGE_!ERRORLEVEL!" | |
@rem return HOGE_255(stdout) | |
find /V "THIS_STRING_IS_NO_USE_IN_BAT" <%~0 >redirect.bat & cmd.exe /v:on /c "redirect.bat >%~n0.log 2>&1" & set REDIRECT=!ERRORLEVEL! & del redirect.bat & exit /b !REDIRECT! | |
set TEST_ENV=1 | |
echo hoge | |
echo redirect %TEST_ENV% 1>&3 | |
if () UNEXPECTED_EXIT | |
sleep 1 | |
exit /b 3 |
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(id){id&&location.href="pixitail://org.cathand.pixitail/pixiv/"+id})(prompt("illust_id?")) |
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
var file_name = "hello.xls", | |
target_sheet_name = "Hello.t", | |
bin_dir = WScript.ScriptFullName.replace(WScript.ScriptName, ""), | |
excel = new ActiveXObject("Excel.Application"), | |
fso = new ActiveXObject("Scripting.FileSystemObject"); | |
var path = fso.buildPath(bin_dir, file_name); | |
var book = (fso.FileExists(path)) | |
? excel.Workbooks.Open(path) | |
: excel.Workbooks.Add(); | |
var work_sheet = (function(sheet_name) { |
OlderNewer