Skip to content

Instantly share code, notes, and snippets.

@benok
benok / save_spotlight.sh
Last active July 25, 2023 04:51
Save Windows Spotlight cache images
#!/bin/sh
# Save Windows Spotlight cache images
# (execute from Git-bash, please)
CACHE_DIR=${LOCALAPPDATA}/Packages/Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy/LocalState/Assets
DEST_DIR=~/Pictures/WindowsSpotlight
mkdir -p $DEST_DIR
cd ${CACHE_DIR}
@benok
benok / SKS3200M-auto-select-english.js
Last active May 23, 2024 10:05
UserScript for Xikestor managed switch SKS3200M to auto-select English on login
// ==UserScript==
// @name Xikestor managed switch SKS3200M auto-select english on login
// @namespace https://github.com/benok
// @version 2024.05.23.1
// @description auto-select "English" on login (confirmed on firmware version 1.9)
// @author benok
// @match http://192.168.10.12/login.cgi
// @match http://(modify with your ip here)/login.cgi
// @icon https://xikestor.com/img/web_support/XikeStor.jpg
// @grant none
@benok
benok / cloud-init.yml
Last active December 12, 2024 06:51
My cloud-config file for BurmillaOS (Use custom console, add packages for debian/ubuntu console, setup swap, install latest docker compose/buildx etc.)
#cloud-config
hostname: burmilla
rancher:
upgrade:
#url: https://raw.githubusercontent.com/benok/burmilla-os-releases/master/releases.yml
url: https://raw.githubusercontent.com/burmilla/releases/master/releases.yml
repositories:
console:
url: https://raw.githubusercontent.com/benok/burmilla-os-console/master
console: debian-testing
@benok
benok / vultr-list-plans.mk
Last active September 27, 2024 05:54
List up & Filter Vultr's Compute Instance plans in tsv & json using vultr-cli and jq.
#
# List up & Filter Vultr's Compute Instance plans* in tsv & json using vultr-cli and jq.
# (filterd by Region & your own condition. sorted by monthly cost. * BareMetal not supprted.)
#
# (Please use "Open Raw" and use curl/wget to download & rename or symlink as Makefile)
#
# usage:
# * Edit REGION below with your region code (refer "vultr-cli regions list") and "make"
# (or "REGION=xxx make")
# * Change filter conditions below as you like
@benok
benok / InstallGitBashToWindowsTerminal.sh
Last active November 28, 2024 10:11
Install GitBash profile to Windows Terminal
#!/bin/sh
# Install GitBash profile to Windows Terminal
# (requires jq. (or sudo from latest Win11 & chocolatey))
set -eu
SET_AS_DEFAULT_PROFILE=1 # set as default profile
COPY_ON_SELECT=1 # enable copy on select