Skip to content

Instantly share code, notes, and snippets.

View hidsh's full-sized avatar

yakshaver hidsh

View GitHub Profile
@hidsh
hidsh / com_tty.ps1
Last active October 1, 2021 06:44
Windows Terminal で COM ポートを使う
# Fully based on the following web pages:
# - https://qiita.com/yapg57kon/items/58d7f47022b3e405b5f3
# - https://kkamegawa.hatenablog.jp/entry/20070220/p2
# thx!
### 接続開始時のスクリプト ###
if([string]::IsNullOrEmpty($args[0])) {
$com_list = Get-WmiObject -Class Win32_PnPSignedDriver -Filter "FriendlyName LIKE '%COM%'" | Select-Object -Property FriendlyName
foreach($line in $com_list) {
@hidsh
hidsh / a_road_to_common_lisp_jp.md
Created March 30, 2021 03:46 — forked from y2q-actionman/a_road_to_common_lisp_jp.md
A Road to Common Lisp 翻訳

この文章は、 Steve Losh 氏の記事 "A Road to Common Lisp" の翻訳です。

原文はこちらです: http://stevelosh.com/blog/2018/08/a-road-to-common-lisp/


A Road to Common Lisp (Common Lisp への道)

これまで、「最近のCommon Lispをどう学ぶとよいでしょう?」と助言を求めるメールをたくさん受け取ってきました。そこで私は、これまでメールやソーシャルメディアに投稿した全てのアドバイスを書き下すことにしました。これが誰かに有益ならば幸いです。

@hidsh
hidsh / yax.json
Created March 8, 2021 01:47
Karabiner-Elements: my-setting for dual-roll R-CTRL + ESC
{
"title": "yax custom",
"rules": [
{
"description": "Post escape if right_control is pressed alone.",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "right_control",
@hidsh
hidsh / obj-pointer-test-buggggg.mq4
Last active February 12, 2021 10:42
MQL4では参照を返せないっぽいので、ポインタを返すテストプログラム。fixできるが、再発防止という点でイマイチ。他にいいやり方はないのか。
//+------------------------------------------------------------------+
//| obj-pointer-test-bugggggg.mq4 |
// バグっているコード。
// 参照のつもりでコンテナ内のメンバ変数を書き換えようとしても、書き換えたのは参照先ではなくコピーしたオブジェクトのほうなので、
// メンバ変数は書き換えできない。--> 32行目付近
//+------------------------------------------------------------------+
#property strict
class TObj {
int m_;
@hidsh
hidsh / ugui-1.cs
Last active January 2, 2021 21:25
unity test: UnityのUIを作ってみよう https://dkrevel.com/makegame-beginner/ui-beginner/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
@hidsh
hidsh / access-1.cs
Last active January 2, 2021 20:39
unity test: アクセス指定子 https://dkrevel.com/makegame-beginner/access/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Cube の Inspector を見ると、script のところに a だけが表示されている
public int a;
internal int b;
protected int c;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
Transform t;
// Start is called before the first frame update
void Start()
@hidsh
hidsh / get-instance-1.cs
Last active December 30, 2020 21:26
unity-test: UnityのC#でインスタンスを取得しよう https://dkrevel.com/makegame-beginner/program-beginner-instance/
// https://dkrevel.com/makegame-beginner/program-beginner-instance/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
@hidsh
hidsh / let-and-lexical-let.el
Last active December 12, 2020 22:06
elisp example: let と lexical-let の違い (emacs 26.3)
;; let の場合
(let (val)
(defun init () (setq val 100))
(defun print () (message "val: %d" val)))
(init) ;; => 100
(let ((val 200))
(print)) ;; => "val: 200" <---!!!
;; lexical-let の場合
@hidsh
hidsh / .vimrc
Created November 10, 2020 21:53
"
" key bindings
"
"------------------------------------------------------
"MODE NO-REMAPPING REMAPPING
"normal nnoremap nmap
"visual vnoremap vmap
"command mode cnoremap cmap
"insert mode inoremap imap
"normal + vilual noremap map