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
String.prototype.pad = function(i){ | |
var s = this; | |
while(s.length<i) s="0"+s; | |
return s; | |
} | |
Date.prototype.format = function(s){ | |
s = s.replace(/Y/g,this.getFullYear()); | |
s = s.replace(/M/g,(this.getMonth()+1).toString().pad(2)); | |
s = s.replace(/d/g,this.getDate().toString().pad(2)); |
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
#!/usr/bin/env node | |
var fs = require('fs'); | |
var help = "Usage : trash [-lhx] files...\n\t-l : list trashcan\n\t-x : cancel (files: timestamp)\n\t-h : help"; | |
var trash = process.env['HOME'] + "/.trash/"; | |
(function(argv, log, error) { | |
argv = require('optimist').parse(argv); | |
if (typeof argv.l === 'string') { |
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
case (int)instructions.Div://divides regB with regC and puts the result in regA | |
if (register[regB] == 0) | |
return -1; | |
register[regA] = register[regB] / register[regC]; | |
executionTime += 39; | |
break; |
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
import java.util.Random; | |
import java.util.Scanner; | |
public class SeedGenerator { | |
public static void main(String[] args) throws Exception{ | |
Scanner scanner = new Scanner(System.in); | |
System.out.print("Write a 6-byte string: "); | |
String string = scanner.next(); | |
byte[] b = string.getBytes("UTF-8"); |
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
import java.util.Random; | |
class X { | |
public static void main(String[] s) { | |
byte[] a = new byte[6], b = new byte[6]; | |
new Random(0x437950CAAB99L).nextBytes(a); | |
new Random(0xD6FD03B08D76L).nextBytes(b); | |
System.out.println(new String(a) + " " + new String(b)); | |
} | |
} |
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
import java.util.Random; | |
public class X{ | |
static{ | |
byte[] b = new byte[6]; | |
new Random(0xFE7147F36BBFL).nextBytes(b); | |
System.out.println(new String(b)); | |
} | |
} |
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
// ==UserScript== | |
// @name YouTube Flash Player Replacer | |
// @namespace http://0xF.kr/script/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author JiminP | |
// @match https://namu.wiki/w/* | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ |
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(window){ | |
var JMap = function JubeatMap(o, print_min){ | |
var music_title = o.m.title ? o.m.title : | |
o.s.m ? o.s.m.split('/').pop().split('.')[0] : | |
o.s.bga ? o.s.bga : ""; | |
this.metadata = { | |
'music': o.s.m || null, 'bga': o.s.bga || null, | |
'title': music_title, 'level': o.m.level || 10, | |
'difficulty': o.m.dif || 3, 'artist': o.m.artist || null, | |
'jacket': o.m.jacket || null |
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
[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++>[-]+++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<<<<<<[>>>>>>>[-]<<<<<[>>>>>+>+<<<<<<-]>>>>>>[<<<<<<+>>>>>>-]<[<<<.>>>[-]]<<.>>>>[-]++++++++++++++++++++++++++++++++.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++.+++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.--------.-------.<<[-]<[>+>+<<-]>>[<<+>>-]<[<.>[-]]>>[-]++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.---------.-------------------------------------------------- |
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
%% Style for homework | |
\NeedsTeXFormat{LaTeX2e}[1994/06/01] | |
\ProvidesPackage{homework} | |
\RequirePackage{fancyhdr,enumerate} | |
\RequirePackage[margin=1in]{geometry} | |
\RequirePackage{amsmath,amsthm,amssymb,tikz} | |
\usetikzlibrary{calc,trees,positioning,arrows,fit,shapes} |