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
# coding: utf-8 | |
# In[14]: | |
get_ipython().magic(u'matplotlib inline') | |
from PIL import Image | |
import os | |
import sys | |
from matplotlib import pyplot as plt |
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
<?php | |
if (isset($_POST['audio'])) { | |
try { | |
$postData = str_replace('data:audio/wav;base64,', '', $_POST['audio']); | |
$credentials = 'test:test'; | |
$ch = curl_init(); | |
curl_setopt_array($ch, [ |
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(){ | |
var urlRegExp = [/.+/, /.+/]; | |
var outputs = []; | |
var ifrm = $("<iframe>").appendTo($("body")); | |
var lists = $("a").filter(function(i){ | |
return | |
$(this).attr("target") == "_blank" && | |
$(this).attr("href").match(urlRegExp[0]); | |
}); | |
var index = 0, max = lists.length; |
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(){ | |
function exec($){ | |
$("head").append("<style>.ui-sortable-placeholder{display: block;}</style>") | |
$.getScript("//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js") | |
.then(function(){ | |
$(".compact-items").sortable(); | |
}); | |
} |
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
drawikr7 = function(x, y, size,flag){ | |
// hook draw function | |
if(Math.round(x)==0 && flag==null) { | |
var n = 1; | |
(function animate(){ | |
ctx.save(); | |
for(var r=0; r<360; r++){ | |
var x = Math.cos(r*3.14/180 * n) * r/2 + w/2; | |
var y = Math.sin(r*3.14/180 * n) * r/2 + h/2; | |
drawikr7(x,y,size,true); |
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
$.when(naga_______i_shori()) | |
.done(function() { | |
console.log("OK!"); | |
}).fail(function() { | |
console.log("fail..."); | |
}).always(function() { | |
console.log("way"); | |
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
// usage: | |
// | |
// search(encodeURIComponent) | |
// | |
// or Other encode / escape function | |
// | |
function search(encodeFunc) { | |
for(var i=0; i<65536; i++) { |
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
var target = "happybirthday"; | |
var r=function(x,r){var s=String,a=Array,b=s.prototype.charCodeAt,c=b.call("a",0);return s.fromCharCode.apply(s,a.prototype.map.call(x,function(v){return c+((b.call(v,0)+r)%26);}))}; | |
for(var i=0;i<26;i++) console.log(r(target, i)); |
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(f,l,m){ | |
f(function(){ | |
l.hash=m.random().toString(36); | |
f(arguments.callee, 100); | |
}) | |
})(setTimeout, location, Math); |