Skip to content

Instantly share code, notes, and snippets.

View riaf's full-sized avatar
🏠
Working from home

Keisuke SATO riaf

🏠
Working from home
View GitHub Profile
@riaf
riaf / README.md
Created April 2, 2025 05:03
Script to manually apply your shell PATH to macOS GUI apps. Fixes issues finding Homebrew/custom tools via launchd & launchctl setenv.

Sync Your Shell PATH to macOS GUI Apps Manually with This Script

The Problem

Are you struggling with macOS GUI applications (like IDEs, text editors, or other tools launched from Finder or Spotlight) not finding command-line tools installed via Homebrew (/opt/homebrew/bin), MacPorts, or in custom directories like ~/bin or /usr/local/bin? This happens because GUI applications on macOS do not automatically inherit the PATH environment variable set by your login shell configuration files (like .zshenv, .zprofile, .bash_profile, or .bashrc). Your carefully configured shell PATH works in the Terminal, but GUI apps remain unaware of it.

The Solution

This Bash script provides a simple, manual way to apply the PATH from your current Terminal session to the macOS GUI environment. Instead of complex automatic synchronization, you run this script whenever you want to update the PATH that GUI applications will use.

AI利活用・開発に関する契約チェックリスト

目的:

経済産業省が令和7年2月に策定した「AIの利用・開発に関する契約チェックリスト」に基づいて、AI利活用に関する契約における主要なテーマ、重要なアイデアや事実をまとめること。企業がAI関連サービスの利用を検討する際の法務リスク、データ保護、セキュリティに関する懸念に対処できるよう支援することを目的とする。

概要:

本チェックリストは、AI技術を用いたサービスの利用者が、サービス提供者に対して提供するデータの利用範囲や契約上のベネフィット(サービスの水準、AI生成物の利用条件等)について十分な検討を行うことを目的としています。想定読者としては、社内法務部・顧問弁護士、ビジネス部門担当者を想定しており、AI利活用による競争力向上とリスク管理の両立、初期的な論点把握と専門家との連携を支援します。

import pandas as pd
csv_file = '00_zenkoku_all_20240830.csv'
df = pd.read_csv(csv_file, header=None, encoding='utf-8', low_memory=False)
df.columns = [
'sequence_number', 'corporate_number', 'process', 'correct', 'update_date',
'change_date', 'name', 'name_image_id', 'kind', 'prefecture_name', 'city_name',
'street_number', 'prefecture_code', 'city_code', 'postcode', 'address_outside',
'address_outside_image_id', 'close_date', 'close_cause', 'successor_corporate_number',
@riaf
riaf / simple-chaser-server-cli.ts
Last active December 12, 2022 12:07
サンプル(動作未確認)
import {
CellTypes,
findPlayersByPosition,
Game,
parseLegacyMap,
State,
} from "https://deno.land/x/[email protected]/mod.ts";
import { LegacyServer } from "https://deno.land/x/[email protected]/examples/legacy_server.ts";
const CELLCHARS = {
@riaf
riaf / userChrome.css
Created August 13, 2020 05:23
Take the anger out of Firefox's UI for use on macOS. (Move the close tab button to the left and only show it on mouseover.)
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
toolbarbutton#alltabs-button {
-moz-binding: url("userChrome.xml#js");
}
.tabbrowser-tab .tab-close-button {
-moz-box-ordinal-group: 0 !important;
opacity: 0;
}

Keybase proof

I hereby claim:

  • I am riaf on github.
  • I am keisuke (https://keybase.io/keisuke) on keybase.
  • I have a public key ASAI_ZVfS8C3nacZu8hpLsonfszLRnG1-FjloeKXgXnRTgo

To claim this, I am signing this object:

@riaf
riaf / riaf.min.svg
Last active November 21, 2017 07:12
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@riaf
riaf / csssh.sh
Created July 26, 2016 07:47
Coreserver に SSH 接続する
curl -XPOST \
-d "id=$USERID" \
-d "pass=$FTPPASS" \
-d "remote_host=$(curl http://dyn.value-domain.com/cgi-bin/dyn.fcg?ip)" \
-d "ssh2=on" \
https://ss1.coressl.jp/www.$CS_SERVER.coreserver.jp/jp/admin.cgi \
| iconv -f SJIS -t UTF8
@riaf
riaf / debian8.sh
Created October 10, 2015 17:10
Debian Jessie for IDCF Cloud
#!/bin/sh
mkdir -p /tmp/debian
cd /tmp/debian
curl -LO curl -LO http://s3.eu-central-1.amazonaws.com/ffuenf-vagrantboxes/debian/debian-8.2.0-amd64_vmware.box
tar xf debian-8.2.0-amd64_vmware.box
ovftool debian-8.2.0-amd64.vmx debian-8.2.0-amd64.ova
cp debian-8.2.0-amd64.ova ~/Dropbox/Public/
rm -rf /tmp/debian
@riaf
riaf / Hybrid.terminal
Created April 23, 2015 02:52
vim-hybrid for terminal.app (Original https://github.com/w0ng/vim-hybrid)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjExMzcyNTQ5MDIgMC4xMjE1Njg2Mjc1IDAuMTMzMzMzMzMzMwAQAYAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp