Skip to content

Instantly share code, notes, and snippets.

View whitebell's full-sized avatar

whitebell whitebell

View GitHub Profile
@whitebell
whitebell / USKeyboardV2.ahk
Created June 24, 2023 06:45
AutoHotKey v2でUSキーボードのリマップしたりするやつ
#Warn
#UseHook
SendMode("Input")
SetTitleMatchMode(2)
; https://gist.github.com/whitebell/631dc73d3312fb9baca9fd1d5bad99cb
; USキーボード
; 1段目
sc029::Send("{``}")
@whitebell
whitebell / iccp.cmd
Created December 28, 2022 13:09
iccプロファイル適用するやつ
@echo off
if /i "%1" == "srgb" (
rem echo srgb
exiftool "-icc_profile<=D:\music\srgb.icc" %2
) else if /i "%1" == "adobergb" (
rem echo adobergb
exiftool "-icc_profile<=D:\music\adobergb.icc" %2
) else (
echo iccp srgb^|adobergb FILE
// ==UserScript==
// @name netkeiba url replace
// @namespace https://gist.github.com/whitebell
// @include https://*.sp.netkeiba.com/*
// @version 1.1.11.20240204
// @grant none
// ==/UserScript==
// https://gist.github.com/whitebell/e27f6c06ba2f79fbcfad73b06703d6a3
@whitebell
whitebell / utren.pl
Last active June 19, 2022 15:04
unixtimeとってリネーム。やっつけ。
#!perl
use strict;
use warnings;
use utf8;
use 5.32.0;
use Image::ExifTool;
unless (@ARGV && $ARGV[0] =~ /\.png$/i && -e $ARGV[0]) {
@whitebell
whitebell / ut.cs
Created January 2, 2022 02:25
Unixtimeとるやつ
using System;
using System.Linq;
if (args.Length != 6)
{
Console.WriteLine("ut year month day hour min sec");
return;
}
var args_i = args.Select(e => Int32.Parse(e)).ToArray();
@whitebell
whitebell / USKeyboardV1.ahk
Last active June 24, 2023 06:44
AutoHotKeyでUSキーボードのリマップしたりするやつ
#NoEnv
#Warn
#UseHook
SendMode Input
SetTitleMatchMode, 2
; https://gist.github.com/whitebell/868f592840a07ab7f5f08cce65ae13f3
; USキーボード
; 1段目
@whitebell
whitebell / make10.pl
Last active September 11, 2021 16:21
make10
use strict;
use warnings;
use 5.30.0;
use overload '**' => \&EXPONENT;
use List::Util qw/reduce/;
sub EXPONENT {
@whitebell
whitebell / EVENT_K14.PP.ERB
Created January 31, 2021 15:00
ERB自動インデント。こっちは出力結果。
; アリス・マーガトロイド口上
;region Defines
;コメントマクロ
;ソースへのジャンプ
;開発者専用
;ユーザ専用
;region 定数
;endregion
@whitebell
whitebell / EVENT_K14.SRC.ERB
Created January 31, 2021 14:59
ERB自動インデント。テスト用にインデント全部潰した。
; アリス・マーガトロイド口上
;region Defines
;コメントマクロ
;ソースへのジャンプ
;開発者専用
;ユーザ専用
;region 定数
;endregion
@whitebell
whitebell / popcount.c
Last active March 18, 2021 12:32 — forked from kylelk/popcount.c
sqlite extension to calculate population bit count
/* compile osx
* gcc -bundle -fPIC -O3 -o popcount.dylib popcount.c
* cl /O2 /favor:INTEL64 /GL /GS /Qpar /LD popcount.c
* */
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "sqlite3ext.h"
SQLITE_EXTENSION_INIT1