Skip to content

Instantly share code, notes, and snippets.

View Snack-X's full-sized avatar

Snack Snack-X

View GitHub Profile
@Snack-X
Snack-X / amazon-calc.js
Created October 14, 2019 15:30
Amazon Total Order Calculator
//
// F12 - Paste - Enter
//
// Last Update: 2019-10-15
// Works for: Amazon JP, Amazon UK
//
// Reference
// - https://gist.github.com/koyopro/a480a45712ccf1bf239c
@Snack-X
Snack-X / keybase.md
Created June 15, 2016 01:52
Keybase

Keybase proof

I hereby claim:

  • I am Snack-X on github.
  • I am snack (https://keybase.io/snack) on keybase.
  • I have a public key whose fingerprint is C7E9 E20D 9741 600C DDA6 B34F 920E 4D7A 33B1 E432

To claim this, I am signing this object:

@Snack-X
Snack-X / gitlab-asset-modification.md
Created March 2, 2016 03:48
GitLab asset modification on Omnibus
@Snack-X
Snack-X / VBoxManage.md
Last active December 6, 2016 00:45
VBoxManage로 VM 만들고 관리하기

1. 편의를 위한 변수

export VM="vm-name"

2. VM 디스크 생성

VBoxManage createhd --filename $VM.vdi --size <size in KB>
@Snack-X
Snack-X / bench.js
Last active August 29, 2015 14:27
String startsWith() benchmark
var assert = require("assert");
var Benchmark = require("benchmark");
// Setup
var shortString = "startsWith";
var longString = ["startsWith"];
for(var i = 0 ; i < 10000 ; i++) longString.push(" and some dummy strings");
longString = longString.join();
@Snack-X
Snack-X / pcg.js
Created January 29, 2015 07:40
pcg32 in javascript, see http://www.pcg-random.org/
var pcg32 = require("./pcg32");
// make a generator
// must seed
var rng = pcg32.rng();
pcg32.srandom_r(rng, 42, 52);
for(var i = 0 ; i < 16 ; i++)
console.log(pcg32.random_r(rng));
@Snack-X
Snack-X / pcg.py
Created January 27, 2015 06:46
pcg32 in python, see http://www.pcg-random.org/
import pcg32
# make a generator
# must seed
rng = pcg32.rng()
pcg32.srandom_r(rng, 42, 52)
for i in range(16):
print pcg32.random_r(rng)
@Snack-X
Snack-X / index.js
Created January 22, 2015 02:36
Tag Dump
var fs = require("fs");
var mm = require("musicmetadata");
var glob = require("glob");
if(process.argv.length < 3) {
console.log("node " + process.argv[1] + " /path/to/mp3/files");
process.exit(1);
}
var lookupPath = process.argv[2];
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>35569</title>
</head>
<body>
<canvas id="cv"></canvas>
<script src="script.js"></script>
</body>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>35569</title>
</head>
<body>
<canvas id="cv"></canvas>
<script src="script.js"></script>
</body>