Skip to content

Instantly share code, notes, and snippets.

View yuru4c's full-sized avatar

ゆる yuru4c

View GitHub Profile
@yuru4c
yuru4c / google.css
Last active June 1, 2018 03:56
Google 検索の邪魔なあれを消す
/*
https://www.google.co.jp/search?
https://www.google.co.jp/imgres?
*/
/* 他の人はこちらも検索 */
.exp-outline, .AUiS2 {
display: none !important;
}
@yuru4c
yuru4c / FormSuspender.cs
Last active June 16, 2018 01:56
艦これ Flash 一時停止プログラムの断片
using System;
using System.Diagnostics;
using System.Windows.Forms;
using Suspender.Utility;
namespace Suspender
{
internal partial class FormSuspender : Form
{
private const int PseudoId = -1;
@yuru4c
yuru4c / argv.js
Last active June 17, 2018 13:01
スペース区切りのコマンド等をパース
var parse = (function () {
var rs = /\s/, rb = /\\\\/g, re = /\\(?=[\s"'])/g;
var or = {'"': /\\"/g, "'": /\\'/g};
return function parse(str) {
var args = []; var i = 0;
for (var c; c = str.charAt(i); i++) {
if (rs.test(c)) continue;
var v = ''; var b = i;
do {
if (c == '\\') { i++; continue; }
@yuru4c
yuru4c / member_id.html
Last active June 18, 2018 13:27
いま pixiv アカウントを作ると id はいくつになるか調べます
<!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">
<title>pixiv member id</title>
<style type="text/css">
* {
font-size: large;
}
body {
@yuru4c
yuru4c / rps.html
Created June 19, 2018 10:24
じゃんけん次の手予測
<!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 name="viewport" content="width=device-width, initial-scale=1">
<title>じゃんけん予測</title>
<style type="text/css">
@yuru4c
yuru4c / @FluxController.txt
Created June 19, 2018 10:38
f.lux を制御します
## FluxController.csproj
### f.lux (v4.66) を制御します
**Classic f.lux と Use wider slider ranges を有効にすること。**
引数に色温度または `auto` を指定できます。
`auto` の場合はカメラから色温度を取得します。
後ろに `-quiet` オプションを付けるとエラーを表示しません。
タスクスケジューラから適宜実行することで環境光と画面の色温度を合わせられます。
@yuru4c
yuru4c / zip.cmd
Last active June 19, 2018 11:11
与えられたフォルダの -0 -D な zip を作成 (bash 必須)
:<<!
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
CALL :mnt "%~0" this
CALL :mnt "%~1" that
bash %this% %that%
EXIT /B
:mnt
SET d=%~d1
SET d=%d:~0,-1%
var snap = (function (floor) {
function calc(value, step) {
return floor(value / step) * step + step;
}
return function snap(value, action, step) {
switch (action) {
case '+': return calc(value, +step);
case '-': return calc(value, -step);
}
};
@yuru4c
yuru4c / leak.html
Created July 18, 2018 05:49
メモリリーク
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>メモリリーク</title>
</head>
<body>
<p>
<big id="out">0</big> バイト<br>
<samp id="err">#text</samp>
@yuru4c
yuru4c / wolframscript.js
Created September 7, 2018 00:17
node.js からの WolframScript 簡易実行
var child_process = require('child_process');
var math = (function (command) {
var wolfram = child_process.spawn(command);
var stdin = wolfram.stdin;
function Args(expr, callback) {
this.expr = String(expr);
if (typeof callback == 'function')
this.callback = callback;