Skip to content

Instantly share code, notes, and snippets.

View hidsh's full-sized avatar

yakshaver hidsh

View GitHub Profile
@hidsh
hidsh / #fix.sh
Last active March 25, 2024 00:38
suppress evil-ex warnings at starupt emacs
#!/usr/bin/sh
patch evil-ex.el evil-ex.patch
@hidsh
hidsh / #fix.sh
Last active March 25, 2024 00:11
suppress undo-tree warning at startup emacs
#!/usr/bin/sh
patch undo-tree.el undo-tree.el.patch
@hidsh
hidsh / #fix.sh
Last active March 25, 2024 00:10
suppress mozc warning at startup emacs
#!/usr/bin/sh
patch mozc.el mozc.el.patch
@hidsh
hidsh / #log
Last active March 17, 2024 19:56
なんか、今日びのgccは個別に -c とかでコンパイルして最後にそいつらをリンクせんでも、1行でソースをコンパイル&リンクしてくれるっぽい
$ ls
Makefile a.out hogelib.c main.c
$ ./a.out
2
$
!!!!!!!!!!!!!まじか!!!!!!!
@hidsh
hidsh / wait-test.sh
Last active November 22, 2023 21:24
shell script example: wait sec
#!/usr/bin/sh
wait_sec=5
beg=`date +%s`
end=$(($beg + $wait_sec))
while [ `date +%s` -le $end ]; do
echo -n '.'
done
echo '\nend'
;;; consult-selected.el --- Consult extension for selected.el -*- lexical-binding: t; -*-
;; Copyright (C) 2022 ballforest
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
@hidsh
hidsh / my-assert.el
Last active April 4, 2023 18:53
my assersion macro
;; 関数のトップレベルでしか動作しないので注意
(defmacro my-assert (form)
`(let* ((backtrace (backtrace-frame 2))
(func-name (nth 1 backtrace)))
(unless ,form (error "Assert in %s(): should be %S" func-name ',form))))
@hidsh
hidsh / soatari_pro_micro_5.ino
Created February 28, 2023 06:22
arduino: soatari-matrix test pgm for sparkfun's pro micro
// soatari-matrix test for pro micro
// マトリクスのテスト RC1..RC3を順ぐりにLO出力にして、LO出力以外のRCxを入力にしてSWxxをセンスする
// マトリクスが変化したときのAD値を表示する
// 7 8 9 <-- pin number
// RC1 RC2 RC3
// ----------------
// - , SW12, SW13
// SW21, - , SW23
// SW31, SW32, -
@hidsh
hidsh / my-consult-ripgrep.el
Created January 2, 2023 03:25
elisp: consult-ripgrep with symbol-at-point and directory to search
(defun my-consult-ripgrep (&optional parg dir initial)
"`consult-ripgrep` with symbol-at-point.
Besides, it can be Specified top directory to search using prefix-argument, e.g. C-u."
(interactive "p")
(setq initial (thing-at-point 'symbol))
(setq dir (pcase parg
(1 nil) ;; not given prefix-arg
(t (let ((insert-default-directory t))
(read-directory-name "Ripgrep Dir: ")))))
(consult-ripgrep dir initial)))
@hidsh
hidsh / mk-fukugen-point.ps1
Created July 8, 2022 02:52
コマンドライン(powershell)で Windows 10 の復元ポイントを作成
# コマンドライン(powershell)で Windows 10 の復元ポイントを作成
#
$comment = Read-Host "コメント"
if([string]::IsNullOrEmpty($comment)) {
$comment = "変更"
}
#Write-Output $comment