Skip to content

Instantly share code, notes, and snippets.

Button(action: {
NSApp.keyWindow?.close()
}) {
Image(systemName: "xmark.circle.fill")
.foregroundColor(.red)
}
@regepan
regepan / xcode.md
Last active October 19, 2024 20:57
xcode
xcrun simctl --set previews delete all
# git
alias gs='git status'
alias gd='git diff'
alias ga='git add'
alias gb='git branch'
alias gl='git log'
alias glp='git log -p'
alias gcm='git commit -m'
alias gc='git checkout'
alias gst='git stash'
@regepan
regepan / .wp-env.json
Last active January 28, 2024 06:30
"core": "./_public",とすることで、localのWordPressをまるごと全部gitに入れられる。下手に隠蔽するより柔軟性が圧倒的に高い。PHPのバージョン変更可能。wp-cli使用可能。
{
"phpVersion": "7.4",
"core": "./_public",
"port": 8888
}
# cliのphpのバージョンを選択して切り替える
sudo update-alternatives --config php

# apache2のphpを無効化 & 有効化
sudo a2dismod php8.0 && sudo a2enmod php7.4

Ref.

apache2 使用するphpのバージョンを変更する

https://mebee.info/2021/08/02/post-29391/

Fast Node Manager (fnm)

Cross-platform support (macOS, Windows, Linux)

# Check installable node versions
$ fnm list-remote

# Install new node version
$ fnm install v18.16.0

絶対パス(absolute path)

<a href="https://github.com/hoge">XXX</a>

ルートパス(root path)

<a href="/hoge">XXX</a>
(function ($) {
})(jQuery);
@regepan
regepan / nodenv.md
Last active September 15, 2021 17:39