Skip to content

Instantly share code, notes, and snippets.

View ksugawara61's full-sized avatar

k2o ksugawara61

  • Kanagawa Japan
View GitHub Profile
@ksugawara61
ksugawara61 / README.md
Last active April 21, 2024 04:51
hygenを使ってみる

hygenを使ってみる

初期設定

$ pnpm add -D hygen
$ pnpm hygen init self

コマンドを作る

@ksugawara61
ksugawara61 / README.md
Created March 25, 2024 02:35
VSCodeでファイル保存時に改行必須にしたい

VSCodeの設定で Preferences > Settings > files.insertFinalNewline で検索

ユーザー設定で、添付画像のようにチェックを入れるだけでOK

image

プロジェクトに導入したいとき

.vscode/settings.json に以下の設定を追加すればできる

@ksugawara61
ksugawara61 / README.md
Last active February 14, 2024 23:37
bunでReact Native expo環境を作る
@ksugawara61
ksugawara61 / README.md
Last active February 3, 2024 05:28
denoのSSGライブラリlumeを試す

lumeを試す

https://lume.land/

所感

  • pagic よりもドキュメントが充実していて拡張性は高そうな印象
  • テンプレートのUIが用意されていないのでMarkdownのデザインが微妙(自分で頑張る必要がある)
  • 画像もプラグイン前提のためデフォルトだと使えないのが辛いところ
  • 拡張性を求めるなら lume / とりあえず公開したいくらい pagic な印象,
@ksugawara61
ksugawara61 / README.md
Last active February 3, 2024 04:20
denoのSSGライブラリpagicを試す
@ksugawara61
ksugawara61 / README.md
Created January 24, 2024 00:36
ワークスペースごとにVSCodeの色を変えたい #tool

.vscode/setting.json を以下のようにすればできる

{
  "workbench.colorTheme": "Solarized Dark",
  "workbench.colorCustomizations": {
    "titleBar.activeBackground": "#bce2e8",
    "titleBar.activeForeground": "#000000"
  }
}
@ksugawara61
ksugawara61 / README.md
Last active January 24, 2024 00:11
mainブランチへマージ前でもworkflow_dispatchを使う方法 #ci

mainブランチへマージ前でもworkflow_dispatchを使う方法

workflow_call を定義しておき、すでにmainにマージ済みのワークフローから workflow_call で呼び出すことで利用できる

  • すでにマージ済みのワークフロー
name: exist_workflow

on:
@ksugawara61
ksugawara61 / README.md
Last active February 4, 2024 02:23
メモ帳代わりにGistPadを使ってみる #tool
@ksugawara61
ksugawara61 / script.sh
Created July 4, 2020 07:28
Macでbundle installでMYSQL2のエラーが出たときの対処法
$ # see also https://qiita.com/fukuda_fu/items/463a39406ce713396403
$ brew info openssl
openssl@1.1: stable 1.1.1g (bottled) [keg-only]
Cryptography and SSL/TLS Toolkit
https://openssl.org/
/usr/local/Cellar/openssl@1.1/1.1.1g (8,059 files, 18MB)
Poured from bottle on 2020-06-08 at 09:27:05
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/openssl@1.1.rb
==> Caveats
A CA file has been bootstrapped using certificates from the system
@ksugawara61
ksugawara61 / confirm_trigger.sql
Last active August 9, 2019 02:37
MySQL Trigger sample snippet
/* for insert */
insert into articles (title) values ('insert_test');
select * from articles;
select * from trigger_sample;
/* for udpate */
update articles set title = 'update_test' where id = 1;
select * from articles;
select * from trigger_sample;