Skip to content

Instantly share code, notes, and snippets.

View golimpio's full-sized avatar

Gilberto Olimpio golimpio

  • Yackandandah VIC, Australia
  • 01:05 (UTC +10:00)
View GitHub Profile
@golimpio
golimpio / gist:19a4f8484202a2b2fb1593b035a31ff7
Created January 22, 2026 07:03
Record Alice V2 JSON File for VIA
{
"name":"BT5.0 KB",
"vendorId":"0x369b",
"productId":"0x0051",
"matrix":{"rows":4,"cols":17},
"firmwareVersion":0,
"menus":[
{
"label":"Lighting",
"content":[
@golimpio
golimpio / egos_throttle.sh
Last active July 5, 2024 02:48
Run cputhrottle for a list of applications in order to limit their CPU usage.
#!/bin/bash
# Run cputhrottle for a list of applications in order to limit their CPU usage.
# This script needs `pidof` and `cputhrottle` installed, which can be installed from homebrew.
# NOTE: This script was tested on MacOS only.
if [[ $EUID > 0 ]]; then
echo "Please run this script as root/sudo"
exit 1
fi
@golimpio
golimpio / create_desktop_app_google_chrome.sh
Last active February 12, 2024 20:27
A shell script to create application shortcuts in Google Chrome on a Mac
#!/bin/sh
#----------------------------------------------------------------------------------------------------------
#
# Original author: Bracken King
# https://www.lessannoyingcrm.com/blog/2010/08/149/create+application+shortcuts+in+google+chrome+on+a+mac
#
# Modified by: Gilberto R. Olimpio
#
# Changes:
@golimpio
golimpio / macOS Internals.md
Created May 17, 2023 08:34 — forked from kconner/macOS Internals.md
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@golimpio
golimpio / README.en.md
Created February 21, 2023 23:31 — forked from akihikodaki/README.en.md
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@golimpio
golimpio / universal-switcher
Created March 25, 2022 10:09 — forked from jthodge/universal-switcher
Show macOS app switcher across all monitors
defaults write com.apple.Dock appswitcher-all-displays -bool true
killall Dock
@golimpio
golimpio / hammerspoon-move-resize.lua
Created February 24, 2022 09:49 — forked from kizzx2/hammerspoon-move-resize.lua
Hammerspoon script to move/resize window under cursor
-- Inspired by Linux alt-drag or Better Touch Tools move/resize functionality
function get_window_under_mouse()
-- Invoke `hs.application` because `hs.window.orderedWindows()` doesn't do it
-- and breaks itself
local _ = hs.application
local my_pos = hs.geometry.new(hs.mouse.getAbsolutePosition())
local my_screen = hs.mouse.getCurrentScreen()
@golimpio
golimpio / mdb2sqlite.sh
Created June 24, 2021 07:38 — forked from kazlauskis/mdb2sqlite.sh
Transforms MS Access MDB file to sqlite database using mdbtools
#!/bin/bash
# Inspired by
# https://www.codeenigma.com/community/blog/using-mdbtools-nix-convert-microsoft-access-mysql
# USAGE
# Rename your MDB file to migration-export.mdb
# run ./mdb2sqlite.sh migration-export.mdb
# wait and wait a bit longer...
mdb-schema migration-export.mdb sqlite > schema.sql
@golimpio
golimpio / textmate-lineheight.sh
Last active March 22, 2021 03:51 — forked from kenjij/textmate-lineheight.sh
Line-height adjustment in TextMate 2
# Add extra room between lines (tested with mPlus Nerd Font)
# Adjust space below the line
defaults write com.macromates.TextMate fontLeadingDelta -float 0.5
# Adjust space above the line
defaults write com.macromates.TextMate fontAscentDelta -float 0
# Reset to default
defaults delete com.macromates.TextMate fontLeadingDelta
# inspired by https://github.com/junegunn/fzf/issues/868
function __fzf_ls_files
git ls-tree -r --name-only HEAD 2>/dev/null; or fd --type f --hidden --follow --exclude .git
end
function __fzf_grep_last
set -l cmd (commandline)
# default complete all, and compatible with fzf `**<TAB>`
if str_endswith "$cmd" ' '; or test $cmd = '**'