Skip to content

Instantly share code, notes, and snippets.

@hetima
hetima / gist:c145eabb6c55a3c8c8d9
Created December 28, 2014 05:32
pkg を解凍するスクリプト。新旧対応、ついでに rar も
#!/usr/bin/env ruby
require "tmpdir"
def proccess_rar(file)
param=["x", file]
system(["unrar", "unrar"], *param)
end
@hetima
hetima / file1.markdown
Last active January 22, 2018 08:51
How to transition from EasySIMBL to SIMBL

#How to transition from EasySIMBL to SIMBL

( ~ is your home directory )

  1. Launch EasySIMBL.app. Turn OFF Use SIMBL checkbox. Quit EasySIMBL.
  2. Remove ~/Library/ScriptingAdditions/EasySIMBL.osax if exists.
  3. SIMBL directory and EasySIMBL.osax located in ~/Library/Containers/ is not needed. Find from Finder or find command like find ~/Library/Containers -name "*SIMBL*" -ls and remove manually if exists.
  4. Restart Mac (just in case).
  5. Install SIMBL-0.9.9 (original SIMBL-0.9.9.pkg is not code signed. So open from context menu)
  6. Done.
@hetima
hetima / makedocset.py
Last active March 3, 2024 20:03
Python 3.6.1 日本語ドキュメントを Dash.app に追加する
#!/usr/bin/env python3
import os
import time
import copy
import urllib.request
import urllib.parse
from shlex import quote
from math import trunc
from bs4 import BeautifulSoup
local a = "a"
function test()
print("a=", a)
print("b=", b)
print("c=", c)
end
local b = "b"
c = "c"
@hetima
hetima / cmd.sh
Created May 25, 2017 09:58
マウスホイールのスクロール加速度を調節
/usr/bin/hidutil property --filter '{"ProductID":0xc246,"VendorID":0x46d,}' --set '{"HIDMouseScrollAcceleration":75000}'
#1行目にカレントパス、2行目に時刻を表示 $i $o に値が代入されていたら内容を表示
PROMPT='%B[%~]%b$([ -n "$i" ] && echo "\n%B$"i:%b $i)$([ -n "$o" ] && echo "\n%B$"o:%b $o)
%B[%T]%b '

Windows 10 SSD 換装

Windows 10 の起動ディスクを換装した記録。サードパーティ製のフリーウェア/シェアウェアは一切使わないポリシーで。

USB メモリの回復ドライブを作る

コンパネ → 回復 → 回復ドライブの作成

システムイメージを作る

コンパネ → バックアップと復元(Windows 7)→ システムイメージの作成

@hetima
hetima / 1.ahk
Last active February 16, 2019 00:54
ahk スクリプト
; エクスプローラのウィンドウ前に出す
+!F11::
; エクスプローラが最前面ならサイクル
WinGetClass, front_class, A
if front_class = CabinetWClass
{
WinGet last_win, IDLast, ahk_class CabinetWClass
WinActivate, ahk_id %last_win%
; 後ろから順に前に出す
} else {
@hetima
hetima / radiko_skip.user.js
Last active April 22, 2022 05:23
radikoプレイヤーUIの下に指定秒数スキップするボタンを配置するtampermonkeyスクリプト
// ==UserScript==
// @name radiko skip
// @namespace http://tampermonkey.net/
// @version 0.1
// @description radikoプレイヤーUIの下に指定秒数スキップするボタンを配置します
// @author hetima
// @match *://radiko.jp/*
// @grant unsafeWindow
// @run-at document-end
// @noframes

PowerShell で fzf

scoop などで fzf をインストール

PSFzf をインストール

Install-Module -Name PSFzf

PowerShell 7 では管理者権限不要だった。インストール場所は "%USERPROFILE%\Documents\PowerShell\Modules"