Skip to content

Instantly share code, notes, and snippets.

View phanect's full-sized avatar

Jumpei Ogawa phanect

View GitHub Profile
@phanect
phanect / neon-setup.md
Last active April 18, 2024 08:37
Personal setup instruction for my KDE neon box

1. Update and install software

sudo pkcon refresh
sudo pkcon update

sudo apt-get install --yes --no-install-recommends --ignore-missing \
  apt-transport-https \
  build-essential \
 curl \

Check Sha256Sum on Windows 11 PowerShell

certutil -hashfile "C:\Users\phane\OneDrive\Desktop\neon-user-20240412-1535.iso" SHA256
@phanect
phanect / git-merge-repos.md
Last active April 18, 2024 00:09
Allow merging of two Git reoisitories
@phanect
phanect / template-script.mjs
Last active December 20, 2023 22:26
JSM (JavaScript modules, aka. ESM) Template for task scripts
import { fileURLToPath } from "node:url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = fileURLToPath(new URL(".", import.meta.url));
@phanect
phanect / local-php-server.sh
Last active December 13, 2023 21:23
local-php-server.sh
docker run --rm -it -p 4000:80 -v /path/to/siteroot:/var/www/html php:apache-buster
{
// ...
"exports": {
".": {
"import": "./dist/main.mjs",
"require": "./dist/main.cjs"
},
"./style.css": {
"import": "./dist/style.css",
"require": "./dist/style.css"
@phanect
phanect / replace-git-identities.sh
Created December 5, 2023 12:50
Commands to replace all the committer emails in the commit logs.
echo -e "Jumpei Ogawa <git@phanective.org> <phanect@users.noreply.github.com>\nJumpei Ogawa <git@phanective.org> <old@example.com>" | tee ./mailmap
git filter-repo --mailmap mailmap
#!/usr/bin/env bash
set -eu
DIRNAME="$(realpath "$(dirname -- "${BASH_SOURCE[0]}")")"
PROJECT_ROOT="$(realpath "${DIRNAME}/..")"
git clean -dX --force
docker rm --force $(docker ps --all --quiet); docker rmi --force $(docker images --all --quiet); docker volume rm $(docker volume ls --quiet)