Skip to content

Instantly share code, notes, and snippets.

@michaelmob
michaelmob / lilnasy-zed-windows-builds-latest.ps1
Created March 6, 2025 14:09
Windows: Download lilnasy's automated builds of zed to ~/Apps
# Description: Download lilnasy's automated builds of Zed to ~/Apps
# Author: github.com/michaelmob
# Last Updated: 2025-03-06
$fileName = if ($args.Count -gt 0) { $args[0] } else { "zed.exe" }
$zedLatest = Invoke-RestMethod -Uri "https://api.github.com/repos/lilnasy/zed-windows-builds/releases/latest"
$downloadUrl = $zedLatest.assets |
Where-Object { $_.name -like $fileName } |
Select-Object -ExpandProperty browser_download_url -First 1
#Requires AutoHotkey v2.0
CoordMode("Mouse", "Screen")
SetKeyDelay(50)
SetCapsLockState("AlwaysOff")
SetTrayIcon := (isActive) => TraySetIcon("shell32.dll", isActive ? 256 : 255)
SetTrayIcon(isActive := false)
OPTION_RESET_TIMEOUT_MS := 1400
@michaelmob
michaelmob / grocy--custom_css.html
Created December 4, 2024 03:59
Custom CSS for Grocy that eases sidebar scrolling from a touchscreen.
<style>
.navbar-sidenav {
overflow-y: auto;
scrollbar-width: none;
}
</style>
@michaelmob
michaelmob / surfingkeys-config.js
Last active June 2, 2024 12:22
My Surfingkeys Configuration
// Fix (2022-12-30): Holding shift to open a link in a new tab using hints
// https://github.com/brookhong/Surfingkeys/issues/1897
settings.hintShiftNonActive = true;
api.mapkey('<space>', 'Select a tab using the omnibar', function() {
api.Front.openOmnibar({ type: "Tabs" });
});
@michaelmob
michaelmob / vim-plug-install.vim
Last active April 9, 2021 18:15
Fetch plug.vim with wget
if empty(glob('~/.vim/autoload/plug.vim'))
let plugurl = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
silent execute '!wget -P ~/.vim/autoload ' . plugurl
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
version: "3.3"
services:
script-server:
container_name: script-server
image: bugy/script-server
restart: unless-stopped
ports:
- "5000:5000"
volumes:
- type: bind
@michaelmob
michaelmob / qemu_usb_dm_config.yml
Last active January 13, 2018 05:24
QEMU_USB_DEVICE_MANAGER_CONFIG
configuration-url: "https://rawgit.com/thetarkus/5527f55dc1ce6eeaf805a9bb1bdc86da/raw/c1b7609801d77c24be6d5eed3329350bd73375f6/qemu_usb_dm_config.yml"
host-machine:
hostname: "pc"
virtual-machines:
windows-vm-1:
monitor: ":7101"
usb-devices:
http://127.0.0.1:8888
@michaelmob
michaelmob / scrot
Last active February 26, 2022 00:20
Use gnome-screenshot for area selection like scrot
#!/usr/bin/env bash
exec gnome-screenshot -a -f ${@:2}
@michaelmob
michaelmob / gchk.user.js
Last active March 25, 2016 23:09
Removes Google's Click Hijacking from search results.
// ==UserScript==
// @name Google Click Hijacking Killer
// @version 1
// @namespace GCHK
// @description Remove Google's Click Hijacking
// @include http://www.google.com/search*
// @include https://www.google.com/search*
// @grant none
// ==/UserScript==