A list of my sources
General news list
[ | |
/* 0. UNBIND VS Code defaults that clash (→ new Emacs-style key) */ | |
{ "key": "ctrl+f", "command": "-actions.find" }, // C-s/C-r = isearch-forward/backward | |
{ "key": "ctrl+s", "command": "-workbench.action.files.save" }, // C-x C-s = save-buffer | |
{ "key": "ctrl+v", "command": "-editor.action.clipboardPasteAction" }, // C-y = yank (paste) | |
{ "key": "ctrl+y", "command": "-redo" }, // C-/ = undo, C-? = redo | |
{ "key": "ctrl+p", "command": "-workbench.action.quickOpen" }, // C-x C-f = find-file | |
{ "key": "ctrl+n", "command": "-workbench.action.files.newUntitledFile" }, // C-x C-n = new-file | |
{ "key": "ctrl+a", "command": "-editor.action.selectAll" }, // C-x h = mark-whole-buffer | |
{ "key": "ctrl+e", "command": "-workbench.action.files.saveAs" }, // C-x C-w = write-file |
#!/bin/bash | |
set -e | |
set -o pipefail | |
# Set system timezone to Tokyo, Japan | |
sudo timedatectl set-timezone Asia/Tokyo | |
# Configure hardware clock to use UTC (recommended for Linux) | |
sudo timedatectl set-local-rtc 0 |
#!/usr/bin/env bash | |
set -euo pipefail | |
# Script to install Ubuntu Secure Boot shim and optionally install and deploy rEFInd | |
# Usage: share this on GitHub Gist, then run: | |
# curl -sL <gist-url> | bash | |
# 1. Update package lists | |
echo "Updating package lists..." | |
sudo apt update |
<# | |
.SYNOPSIS | |
Configures Windows to interpret the hardware clock (RTC) as Coordinated Universal Time (UTC). | |
.DESCRIPTION | |
This script adds or updates the 'RealTimeIsUniversal' DWORD value in the Windows Registry | |
at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation. | |
Setting this value to 1 tells Windows to treat the hardware clock as UTC, | |
aligning its behavior with most Linux distributions (like Ubuntu) and resolving | |
time discrepancies in dual-boot environments. |
#!/usr/bin/env bash | |
set -euo pipefail | |
# ----------------------------------------------------------------------------- | |
# cleanup-emacs-backups.sh | |
# | |
# Recursively find and delete all Emacs backup files (ending in '~') in | |
# the given directory (defaults to current directory). | |
# | |
# Usage: |
#!/usr/bin/env bash | |
set -euo pipefail | |
# 1) Install acpid if missing | |
if ! dpkg -s acpid >/dev/null 2>&1; then | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y acpid | |
fi | |
# 2) Enable/start it if needed |
#!/usr/bin/env bash | |
set -euo pipefail | |
CFG="/boot/grub/grub.cfg" | |
# 1) Read every top‑level menuentry title (handles leading whitespace & both quote styles) | |
mapfile -t ENTRIES < <( | |
grep -E "^[[:space:]]*menuentry [\"'].*[\"']" "$CFG" \ | |
| sed -E "s/^[[:space:]]*menuentry [\"']([^\"']+)[\"'].*/\1/" | |
) |
rem to disable private dns | |
adb shell settings put global private_dns_mode off | |
rem to enable private dns with hostname (example with dns.adguard.com) | |
adb shell settings put global private_dns_mode hostname | |
adb shell settings put global private_dns_specifier dns.adguard.com |
#!/bin/bash | |
set -e | |
set -o pipefail | |
# Install 1Password password manager | |
sudo apt update && sudo apt install 1password -y | |
# Install vanilla GNOME desktop environment (without Ubuntu modifications) | |
sudo apt purge pipewire-alsa pipewire-audio -y | |
sudo apt install vanilla-gnome-desktop vanilla-gnome-default-settings -y |