Skip to content

Instantly share code, notes, and snippets.

View kjunichi's full-sized avatar

Junichi Kajiwara kjunichi

View GitHub Profile
UnicodeDecodeError: 'cp932' codec can't decode byte 0x83 in position 69: illegal
multibyte sequence
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown encoding: cp20127
I just act for only what i believe even though when i work my job,But there is exception Where i am in front of my wife. w これ、意味通じるかね
@kjunichi
kjunichi / JavaScript_Regex.md
Last active August 29, 2015 13:55
むかしはPerlで少しこの辺りを勉強しようとはしていたのだが、、、

JavaScriptでの正規表現の扱い

キャプチャ関連

$1,$2
@kjunichi
kjunichi / file0.js
Created February 3, 2014 01:00
NodObjCでNSLogを任意のファイルに出力する ref: http://qiita.com/kjunichi/items/3c00e7ac15bb3bc04796
fs.closeSync(2)
var fd = fs.openSync("foobar.log", 'w')
$.NSLog($("NSLogのテスト"))
TypeError: Cannot call method 'getProtectedResource' of undefined
at app.get.res.render.user (/var/lib/stickshift/52c6cfcb4382eca1e20002b6/app-root/data/431589/app.js:83:37)
at callbacks (/var/lib/stickshift/52c6cfcb4382eca1e20002b6/app-root/data/431589/node_modules/express/lib/router/index.js:161:37)
at param (/var/lib/stickshift/52c6cfcb4382eca1e20002b6/app-root/data/431589/node_modules/express/lib/router/index.js:135:11)
at pass (/var/lib/stickshift/52c6cfcb4382eca1e20002b6/app-root/data/431589/node_modules/express/lib/router/index.js:142:5)
at Router._dispatch (/var/lib/stickshift/52c6cfcb4382eca1e20002b6/app-root/data/431589/node_modules/express/lib/router/index.js:170:5)
at Object.router (/var/lib/stickshift/52c6cfcb4382eca1e20002b6/app-root/data/431589/node_modules/express/lib/router/index.js:33:10)
at Context.next (/var/lib/stickshift/52c6cfcb4382eca1e20002b6/app-root/data/431589/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Context.actions.pass (/va
data='aaa<form method="GET" action="hoo/aa?aaa=bbb&bbb=ggg" aa="bb"><div><form method="GET" action="hoo/aa?aaa=bbb&bbb=ggg" aa="bb">aaaa</div>aaa';
data = data + '<form method="GET" action="bar/aa?aaa=bbb&bbb=ggg" aa="bb">';
var cnt=0;
data = data.replace(/<form (.*?)action="(.*?)"(.*?)>/g,function(str,p1,p2,p3,offset,s) {
console.log("cnt = " +cnt);
var newAction = p2.replace(/(.*?)\?.*/,"$1");
var queryStr = p2.replace(/.*?\?(.*)/,"$1");
console.log("action : "+newAction);

こいつのせいで、勝手にブラウザが、リダイレクトしていた件

function utmx_section(){}function utmx(){}(function(){var
k='6007595-12',d=document,l=d.location,c=d.cookie;
if(l.search.indexOf('utm_expid='+k)>0)return;
function f(n){if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.
indexOf(';',i);return escape(c.substring(i+n.length+1,j<0?c.
length:j))}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;d.write(
'