Skip to content

Instantly share code, notes, and snippets.

View hidsh's full-sized avatar

yakshaver hidsh

View GitHub Profile
@hidsh
hidsh / Arc2Seg_US_v103y.lsp
Last active April 17, 2024 10:29
AutoCAD/IntelliCAD: A lisp command to convert Arc to a segmented line
;;
;; Generation de polygones reguliers sur les Arcs , Cercles et Arcs dans Polylignes
;;
;; Les XDatas sont copiees sur la nouvelle polyligne.
;;
;; Routine: ARC2SEG vers 1.03 par Gilles (gile) le 10 Nov 2008
;; Transforme les arcs, cercles et polyarcs en polylignes constituees de segments droits
;;
;; 1 - Correction du bug sur les arcs > 180 degres
;;
@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'
@hidsh
hidsh / prim-delay-test.c
Last active October 10, 2023 03:55
Cで一次遅れフィルタ
#include <stdio.h>
typedef short s2;
s2 primary_delay(s2 in, s2 old)
{
const s2 TS = 1; // sampling period[ms]
const s2 TAU = 100; // time constant[ms]
return (TS * in + TAU * old + TAU) / (TS + TAU);
@hidsh
hidsh / History\-176f8d10\entries.json
Last active August 8, 2023 01:15
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///d%3A/_docu/unity_proj/arpg2/Assets/script/player_controller.cs","entries":[{"id":"yaKU.cs","timestamp":1658181100504},{"id":"b1DB.cs","timestamp":1658181174267},{"id":"QOqC.cs","timestamp":1658181262517},{"id":"Vki9.cs","timestamp":1658181293474},{"id":"06hw.cs","timestamp":1658181388790},{"id":"BHHp.cs","timestamp":1658181540740},{"id":"g8jf.cs","timestamp":1658181582683},{"id":"ANDE.cs","timestamp":1658222063623},{"id":"92ys.cs","timestamp":1658222335751},{"id":"g2YC.cs","timestamp":1658222367658},{"id":"kZ6x.cs","timestamp":1658228505694},{"id":"BIFx.cs","timestamp":1658269759406},{"id":"YjIw.cs","timestamp":1658269774517},{"id":"rxLk.cs","timestamp":1658272891281},{"id":"QucJ.cs","timestamp":1658343377894},{"id":"xjyU.cs","timestamp":1658343469871},{"id":"Q3Dz.cs","timestamp":1658343804211},{"id":"B8br.cs","timestamp":1658343976899},{"id":"rwOn.cs","timestamp":1658344026839},{"id":"i9Vi.cs","timestamp":1658346136641},{"id":"ZrpI.cs","timestamp":1658346439331},{"id":"zpDm.c
@hidsh
hidsh / full_adder.vhdl
Created December 4, 2012 07:07
VHDL: half adder and full adder
-- full_adder.vhdl
-- desc: 1bit full adder
entity FULL_ADDER is
port(A, B, CIN: in bit;
SUM, COUT: out bit);
end FULL_ADDER;
architecture STRUCT of FULL_ADDER is
component HALF_ADDER
@hidsh
hidsh / emacs-test-emulate-key-input-and-exec-minibuffer.el
Last active April 5, 2023 20:30
elispでミニバッファに何か入力して実行するテスト
;; M-x ttt すると f2関数がコール
;; -> 自動でミニバッファに文字列を入力
;; -> 自動でEnter入力
;; -> 結果が表示される
(defun f2 ()
"ミニバッファに文字列を入力してEnterする。"
(insert "(1+ 5)")
(setq unread-command-events (listify-key-sequence "\C-j")) ;; Enterキー入力をエミュレート
;;(setq unread-command-events (listify-key-sequence (kbd "RET"))) ;; こっちでないとダメなときがある