Skip to content

Instantly share code, notes, and snippets.

View omega-takai's full-sized avatar
🏠
Working from home

TAKAI Tomonari omega-takai

🏠
Working from home
View GitHub Profile
@omega-takai
omega-takai / settings.json
Created December 6, 2025 05:11
IDE Settings
{
"tailwindCSS.experimental.classRegex": [["(`.*?`)", "(\".*?\")", "('.*?')"]],
"tailwindCSS.classFunctions": ["tv"]
}
@omega-takai
omega-takai / oneliner.md
Created October 27, 2025 04:37
oneliner

Delete DS_Store

カレントディレクトリ(.)以下から再帰的に .DS_Store ファイルを検索し、削除します。

find . -name ".DS_Store" -type f -delete
  • コマンドの解説
  • find .: カレントディレクトリ(.)から検索を開始します。
import { NextRequest, NextResponse } from 'next/server';
import { decrypt, encrypt, updateSession } from '@/actions/session';
const BASIC_USER = process.env.BASIC_USER;
const BASIC_PASS = process.env.BASIC_PASS;
const AUTH_MODE = process.env.AUTH_MODE;
/**
* Basic認証を判定し、成功時はユーザー名を返す。失敗時はnull。
*/

MQL

Marketing Qualified Lead(マーケティング・クオリファイド・リード) の略で、マーケティングの活動を通じて獲得された見込み顧客(リード)のうち、営業チームに引き渡す準備が整った顧客層を指します。

@omega-takai
omega-takai / .zshrc
Last active October 15, 2025 03:41
alias
source /Users/takai/.config/op/plugins.sh
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"
# alias shell
alias pn=pnpm
# alias git
alias gst='git status'
alias gb='git branch -vv'
@omega-takai
omega-takai / npm-scripts.json
Created February 12, 2024 02:10
npm scriptsでファイルやフォルダを削除するときに、もうrimrafやdel-cliみたいなnpmモジュールをインストールしなくても、こうやって書けば大丈夫っぽい。
{
"scripts": {
"clean": "node -e \"fs.promises.rm('script.js', {force: true})\"",
"clean": "node -e \"fs.promises.rm('../dist', {recursive: true, force: true})\""
}
}
// React Newline to break (nl2br)
{this.props.text.split('\n').map((item, key) => {
return <Fragment key={key}>{item}<br/></Fragment>
})}

Git Log

$ git log --pretty=format:' %Cgreen(%cr) %Cred%h - %Creset %s %C(bold blue)<%an>%Creset' --follow {path/to/file}
$ git log branchA..branchB --merges --pretty=tformat:"%h %ad %s" --date=format:%Y/%m/%d

人数カウント

if(length(prop("MeToo")) > 0, length(replaceAll(prop("MeToo"), "[^,]", "")) + 1, 0)

ファイルの作成日を確認する

$ git log --reverse --date=short -- {file/to/path}

ファイルの最終更新日を確認する

$ git log -1 --date=short -- {file/to/path}