Skip to content

Instantly share code, notes, and snippets.

View yuru4c's full-sized avatar

ゆる yuru4c

View GitHub Profile
@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 / 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 / WiFi ProfileOrder.cmd
Last active November 1, 2018 23:55
Windows 8 以降で Wi-Fi の優先順位を変更
@ECHO OFF
SET INTERFACE="Wi-Fi"
:loop
SET NAME=
SET PRIORITY=
netsh wlan show profiles interface=%INTERFACE%
SET /P NAME="優先順位を変更するユーザー プロファイルの名前 >"
IF ERRORLEVEL 1 GOTO loop
SET /P PRIORITY="ユーザー プロファイルの新しい優先順位 >"
@yuru4c
yuru4c / week_of_year.js
Last active February 2, 2020 02:52
日付から週番号を求めます
/**
* 週番号を求めます
* @function
* @param time 週番号を求める日付
* @param {number} [weekRule=0] 週番号の規則
* <br> 0 - 元日から大晦日まで
* <br> 1~7 - その日を含む週から
* @param {number} [firstDay=0] 週初日の曜日
* @returns {number} 週番号 (0 - エラー)
*/
@yuru4c
yuru4c / 2019.html
Last active November 2, 2018 07:14
カレンダー
<!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">
<link rel="stylesheet" href="cal.css">
<title>カレンダー</title>
<style type="text/css" media="screen">
.cal {
margin: auto;
width: 1024px;
@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 / 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%
@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` オプションを付けるとエラーを表示しません。
タスクスケジューラから適宜実行することで環境光と画面の色温度を合わせられます。