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
#!/bin/bash | |
if [ $# -lt 1 ] | |
then | |
exit | |
fi | |
cue_file=$1 | |
wav_file=$(cat $cue_file | grep FILE | sed -e "s/^FILE \"\(.*\)\".*$/\1/") | |
cuebreakpoints "$cue_file" | shntool split "$wav_file" |
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 document = require("jsdom").jsdom(require("fs").readFileSync(process.argv[2])), | |
cue = require("fs").readFileSync(process.argv[3]).toString().split("\n"), | |
discTitle = document.getElementsByTagName("release")[0].getElementsByTagName("title")[0].textContent, artists = "", titles = [], | |
medium = document.getElementsByTagName("medium"), | |
tracks, credits, discNo = process.argv.length > 4 ? parseInt(process.argv[4], 10) - 1 : 0, i = 0, j = 0; | |
if(medium.length > 1){ | |
discTitle += " (Disc " + (discNo + 1).toString() + ")"; |
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
exports.NetworkObj = function(){ | |
var NetworkObj = function(){ | |
this.connections = []; | |
this.spaces = this.getInitSpaces(); | |
}; | |
NetworkObj.prototype = (function(){ | |
var edges = []; | |
require("fs").readFileSync("distance.txt").toString().replace(/\r/, "").split("\n").forEach(function(row){ | |
var values = row.split(" "), |
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 | |
define("RDIR", (isset($_SERVER["HTTPS"]) ? "http://" : "https://") . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . "?t"); | |
header("Access-Control-Allow-Origin: *"); | |
header("Access-Control-Allow-Headers: x-prototype-version,x-requested-with"); | |
if(isset($_GET["r"])){ | |
header("Location: " . RDIR); | |
exit(); | |
} |
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 | |
define("TESTFILE", "zero"); | |
if(isset($_GET["d"])){ | |
readfile(TESTFILE); | |
exit(); | |
}else if(isset($_GET["n"])){ | |
exit(); | |
} | |
?> | |
<!doctype html> |
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
#!/bin/bash | |
ETH="p1p1" | |
NET6SCRPATH="/usr/local/bin/iij-ipv6-up" | |
$NET6SCRPATH | |
NET6PREFIX=$(ip -6 addr show dev ppp128 scope global | grep inet6 | sed -e s/^\ \*inet6\ //g -e s/\ .\*\$//g -e s/\\\(:[0-9a-f]*\\\)\\{4\\}\\/64//g)"::/64" | |
sysctl net.ipv6.conf.all.forwarding=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
var ISBN = (function(){ | |
"use strict"; | |
var validateISBN13 = function(isbnChars){ | |
var checksum = 0; | |
isbnChars.forEach(function(isbnChar, key){ | |
checksum += parseInt(isbnChar, 10) * (key % 2 === 1 ? 3 : 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
(function(){ | |
var TestType = function(num){ | |
var target = {}, | |
internal = {num10 : num * 10}; | |
target.firstProp = internal.num10.toString(); | |
target.firstMethod = function(){ console.log("The first method: " + target.firstProp); }; | |
return target; | |
}, |
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
#!/bin/sh | |
sed -i -e "/nameserver 2001:240:.*$/d" /etc/resolv.conf | |
iter=0 | |
until nc ipv6a.2iij.net 1723 < /dev/null > /dev/null 2>&1 | |
do | |
iter=$(expr $iter + 1) | |
if [ $iter -gt 30 ] |
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 HttpSimpleRequest = function(){ | |
var http = require("http"), https = require("https"), | |
target = {}, | |
getProperProtocol = function(param){ | |
var testee = ""; | |
if(typeof param === typeof ""){ | |
testee = param.toString(); |