Skip to content

Instantly share code, notes, and snippets.

View yuru4c's full-sized avatar

ゆる yuru4c

View GitHub Profile
@yuru4c
yuru4c / index.html
Last active August 31, 2021 09:07
HAR に含まれるファイルを展開(NW.js 用)
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>har reader</title>
<style type="text/css">
body {
white-space: nowrap;
}
.browser .nw {
@yuru4c
yuru4c / install chromium.cmd
Last active January 25, 2023 10:00
Chrome や Edge,Brave の本体のみをインストール(単体インストーラーをドロップ)
@(echo `") >$null <# ") >NUL
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
SET x=.ps1
SET f="%~dpn0%x%"
(
REN "%~f0" "%~n0%x%" 2>NUL
PowerShell -ExecutionPolicy Unrestricted -NoProfile -File %f% %*
REN %f% "%~nx0" 2>NUL
)
@yuru4c
yuru4c / gpu.js
Last active July 23, 2021 17:34
WebGL による並列計算
var GPU = (function () {
function GPU(canvas) {
this.gl = canvas.getContext(CONTEXT_TYPE);
if (this.gl == null) {
throw new Error(CONTEXT_TYPE);
}
this._extensions = {};
for (var i = 0; i < EXTENSION_NAMES.length; i++) {
@yuru4c
yuru4c / w32time.reg
Created May 2, 2020 02:13
Windows NTP 設定
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config]
"MaxAllowedPhaseOffset"=dword:0000012c
"PhaseCorrectRate"=dword:00000007
"UpdateInterval"=dword:00000064
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]
"NtpServer"="ntp.nict.jp,0x8"
@yuru4c
yuru4c / uploader.js
Last active March 27, 2020 15:49
複数ファイルアップロード
var Uploader = (function () {
function Uploader(url, name) {
this.chunk = 0;
this.retry = 0;
this.timeout = 0;
this._url = url;
this._name = name;
this._i = -1;
@yuru4c
yuru4c / promise.js
Last active March 10, 2020 22:00
Promise の実装
var Promise = (function (global, undefined) {
"use strict";
var Promise = (function () {
function Promise(executor) {
if (executor instanceof constructor) {
this._ = executor;
} else {
this._ = new constructor();
@yuru4c
yuru4c / bfrtex.js
Last active July 1, 2019 04:06
BFRTEX の GMO コイン移植
/*
GitHub Pages を利用するため、移動しました。
https://github.com/yuru4c/bfrtex-gmo
*/
@yuru4c
yuru4c / phase.css
Last active March 8, 2019 17:39
月相表示
[data-phase] {
position: relative;
overflow: hidden;
border: solid black;
background-color: black;
}
[data-phase] *, [data-phase]:before {
position: absolute;
left: 0;
@yuru4c
yuru4c / attrParser.js
Last active February 12, 2019 09:05
CSS 風宣言パーサ
var parse = (function () {
var cb = '\\', cd = '"', cq = "'";
var re = /\\(?=[;/*])/g, rc = /\\(?=:)/g, rt = /[^\s]/;
function slice(css, h, i) {
return css.substring(h, i).replace(re, '');
}
function prop(css, h, i) {
return slice(css, h, i).replace(rc, '');
}
function trim(s) {
@yuru4c
yuru4c / template.html
Created November 3, 2018 08:03
HTML 4.01 の雛型
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="ja-JP">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>#text</title>