Skip to content

Instantly share code, notes, and snippets.

View ian-h-chamberlain's full-sized avatar
🏔️

Ian Chamberlain ian-h-chamberlain

🏔️
View GitHub Profile
@ivan
ivan / userChrome.css
Created July 31, 2024 06:37
userContent.css and userChrome.css for Firefox / Floorp
/*************************************************************************************************************************************************************************************************************************************************************
"userChrome.css" is a custom CSS file that can be used to specify CSS style rules for Floorp's interface (NOT internal site) using "chrome" privileges.
For instance, if you want to hide the tab bar, you can use the following CSS rule:
**************************************
#TabsToolbar { *
display: none !important; *
} *
@majal
majal / minterpolate
Last active February 8, 2025 20:57 — forked from sgqy/minterpolate.sh
Multi-threaded minterpolate in ffmpeg
#!/bin/bash
# Multicore minterpolate in ffmpeg
# Just slice & process & concat
# NB: The concat points between slices may be weird
# Default arguments
ff=/usr/bin/ffmpeg
fps=60
dur=00:00:10
@573
573 / readme.md
Last active May 16, 2024 18:25
nix repl for home-manager home.nix config

https://logs.nix.samueldr.com/home-manager/2020-06-24#3652401;

NIX_PATH=nixpkgs=http://nixos.org/channels/nixos-21.05/nixexprs.tar.xz:home-manager=https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz:nix-on-droid=https://github.com/t184256/nix-on-droid/archive/release-21.05.tar.gz nix repl
nix-repl> hm = import <home-manager/modules> { configuration = ~/.config/nixpkgs/home.nix; pkgs = import <nixpkgs> {}; }
~> hm.config.TAB
@networkException
networkException / KDE-Plasma-macOS-Screenshot-Shortcuts.md
Last active December 15, 2023 11:52
Setup Plasma Custom Shortcuts for macOS like Screenshots

Introduction

After moving to Linux and KDE Plasma from macOS, I only missed one thing that I used all the time: The Screenshot tool. The Shortcuts on macOS have been engraved in my head after probably thausand of uses so I figured I'd give replicating them a try.

Creating new Shortcuts was surprisingly easy so here is a rundown of it

NOTE: A recent edit of this document now includes a Plasma Native approach using Spectacle.

@andrebrait
andrebrait / keychron_linux.md
Last active May 9, 2025 03:09
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@3v1n0
3v1n0 / fish-shell-bash-complete-function.sh
Last active May 10, 2025 13:06
Use bash completions in Fish Shell
#!/usr/bin/fish
# You can add this to your ~/.config/fish/config.fish
function __fish_complete_bash
set cmd (commandline -cp)
bash -c "source get-bash-completions.sh; get_completions '$cmd'"
end
# Set the tool to use bash completions
@experimatt
experimatt / iterm-colors-to-vscode.js
Last active July 5, 2024 17:48
A simple script to use your iTerm color profile in vscode's built-in terminal.
// This script takes an iTerm Color Profile as an argument and translates it for use with Visual Studio Code's built-in terminal.
//
// usage: `node iterm-colors-to-vscode.js [path-to-iterm-profile.json]
//
// To export an iTerm Color Profile:
// 1) Open iTerm
// 2) Go to Preferences -> Profiles -> Colors
// 3) Other Actions -> Save Profile as JSON
//
// To generate the applicable color settings and use them in VS Code:
@dvf
dvf / change-codec.md
Last active May 9, 2025 12:52
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@notyal
notyal / lnav-nginx-netdata.json
Last active December 20, 2023 14:44
lnav log format definition for NGINX access.log (netdata vhost format) and NGINX error.log
{
"nginx_access_log" : {
"title" : "NGINX NetData Access Log",
"description" : "NGINX NetData Access Log Format",
"url" : "https://github.com/netdata/netdata/blob/master/collectors/python.d.plugin/web_log/web_log.conf",
"multiline" : false,
"regex" : {
"netdata_vhost" : {
"pattern" : "(?P<host>[a-zA-Z\\d.-_\\[\\]]+)\\s+(?P<server_port>\\d+)\\s+(?P<remote_addr>[\\da-f.:]+)\\s+[\\w\\.\\-]+\\s+(?<remote_user>\\S+)\\s+\\[(?<timestamp>[^\\]]+)\\]\\s+\"(?:\\-|(?<request>\\w+) (?<request_uri>[^ \\?]+)(?:\\?(?<request_uri_query>[^ ]*))? (?<request_version>[\\w\\\/\\.]+))\"\\s+(?P<status>[1-9]\\d{2})\\s+(?P<body_bytes_sent>\\d+)\\s+(?P<request_length>\\d+)\\s+(?P<request_time>\\d+(?:.\\d+)?)\\s+(?:\\-|(?P<upstream_response_time>\\d+(?:.\\d+)?))\\s+\"(?<http_referer>[^\"]+)\"\\s+\"(?<http_user_agent>[^\"]+)\""
}
@2xAA
2xAA / iterm-colors-to-vscode.js
Last active September 23, 2024 20:51
Convert iTerm2 "itermcolors" file to VSCode terminal color scheme
/* Generate colors using: `plutil -convert json` in your terminal */
const col = [] // run your .itermcolors file through the above parser and replace the array with the output
function componentToHex(c) {
const hex = c.toString(16)
return hex.length === 1 ? `0${hex}` : hex
}
const mapping = {
'terminal.background':'Background Color',