Skip to content

Instantly share code, notes, and snippets.

View ikr7's full-sized avatar
🅰️
rch Linux

ikr7

🅰️
rch Linux
View GitHub Profile
@ikr7
ikr7 / prime-factrize.js
Created May 1, 2016 06:04
ポラード・ロー素因数分解アルゴリズム
'use strict';
const xor64 = function (y) {
y = y >>> 0;
y = y ^ (y << 13);
y = y ^ (y >> 7);
y = y ^ (y << 17);
return y >>> 0;
};
@ikr7
ikr7 / index.html
Created April 26, 2016 10:20
アニメ
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>WebGL でマンデルブロくん</title>
<style>
body {
margin:0;
overflow:hidden
@ikr7
ikr7 / index.html
Created April 20, 2016 14:53
WebGL でマンデルブロくん
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>WebGL でマンデルブロくん</title>
<style>
body {
margin:0;
overflow:hidden
@ikr7
ikr7 / index.html
Last active April 19, 2016 23:36
マンデルブロくん
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>マンデルブロくん</title>
<style>
body {
margin:0;
overflow:hidden
@ikr7
ikr7 / index.html
Created April 14, 2016 01:55
manderuburo-shuugou
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<canvas style="width:500px;height:500px;"></canvas>
<script>
var canvas = document.querySelector('canvas');
@ikr7
ikr7 / index.html
Created April 5, 2016 14:26
デレステ
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>デレステの Groove イベントの総ノーツ数から 曲編成を特定するやつ</title>
</head>
<body>
<h1>デレステの Groove イベントの総ノーツ数から 曲編成を特定するやつ</h1>
<p>※Masterのみです、一部 Groove イベントに登場し得ない楽曲が含まれる場合があります</p>
@ikr7
ikr7 / nku.hs
Last active March 29, 2016 14:42
n次元九九
nku :: Integer -> [Integer]
nku 0 = [1]
nku n = concat (map (\x -> map (*x) [1..9]) (nku (n - 1)))
@ikr7
ikr7 / nku.hs
Created March 29, 2016 14:22
n次元九九
nku :: Integer -> [Integer]
nku 0 = error "Oh, Zero! It's Zero! Huh?"
nku 1 = [1..9]
nku n = concat (map (\x -> map (*x) [1..9]) (nku (n - 1)))
@ikr7
ikr7 / XYZ で回すのをクォータニオンにするやつ.js
Created February 14, 2016 15:10
XYZ で回すのをクォータニオンにするやつ.js
const algebra = require('algebra');
const xyz2q = function (thx, thy, thz) {
const x = new algebra.Quaternion([
Math.cos(thx / 2),
Math.sin(thx / 2),
0,
0
]);
const y = new algebra.Quaternion([
@ikr7
ikr7 / besiege.js
Last active February 6, 2016 14:36
ワイワイ
'use strict';
const builder = require('xmlbuilder');
const guid = require('guid');
class Machine {
constructor (option) {
this.name = option.name || 'machine';
this.position = option.position || {x: 0, y: 0, z: 0};
this.rotation = option.rotation || {x: 0, y: 0, z: 0, w: 1};