Skip to content

Instantly share code, notes, and snippets.

View nicoandmee's full-sized avatar
🏠
Working from home

Nico Kokonas nicoandmee

🏠
Working from home
View GitHub Profile
@velzie
velzie / manifest-v2-chrome.md
Last active June 26, 2024 04:02
How to keep using adblockers on chrome and chromium

How to keep using adblockers on chrome and chromium

  1. google's manifest v3 has no analouge to the webRequestBlocking API, which is neccesary for (effective) adblockers to work
  2. starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions alltogether
  3. this will inevitably piss of enterprises when their extensions don't work, so the ExtensionManifestV2Availability key was added and will presumably stay forever after enterprises complain enough

You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working

Linux

In a terminal, run:

@mnoumanshahzad
mnoumanshahzad / make-to-just.sh
Created January 11, 2024 12:21
Port Makefile targets to Justfile recipes to enable incremental deprecation of Makefile usage
#!/bin/bash
# Name of the Makefile to be converted
MAKEFILE="Makefile"
# Name of the output Justfile
JUSTFILE="Justfile"
# Check if the Makefile exists
if [ ! -f "$MAKEFILE" ]; then
sanitise tridactyllocal
set escapehatchsidebarhack false
set smoothscroll true
set searchengine b
unbind <F1>
unbind <SA-ArrowUp><SA-ArrowUp><SA-ArrowDown><SA-ArrowDown><SA-ArrowLeft><SA-ArrowRight><SA-ArrowLeft><SA-ArrowRight>ba
unbind --mode=browser <A-6>
@pazimzadeh
pazimzadeh / init.lua
Created November 30, 2023 17:16
My Hammerspoon config file
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "R", function()
hs.reload()
end)
hs.alert.show("Config loaded")
hs.loadSpoon("ShiftIt")
spoon.ShiftIt:bindHotkeys({})
spoon.ShiftIt:bindHotkeys({
left = {{ 'alt', 'cmd' }, 'z' },
@truebit
truebit / init.lua
Last active May 22, 2024 04:14
Kitty Terminal: pull down from top like iTerm2
local spaces = require("hs.spaces") -- https://github.com/asmagill/hs._asm.spaces
-- Switch kitty
hs.hotkey.bind({'command'}, 'escape', function () -- change your own hotkey combo here, available keys could be found here:https://www.hammerspoon.org/docs/hs.hotkey.html#bind
local BUNDLE_ID = 'net.kovidgoyal.kitty' -- more accurate to avoid mismatching on browser titles
function getMainWindow(app)
-- get main window from app
local win = nil
while win == nil do
@bombsimon
bombsimon / jj
Last active April 23, 2024 06:45
Wrapper around `just` to help finding the right recipe
#!/usr/bin/env sh
set -eu
_get_user_input() {
editor=${EDITOR:-vi}
tempfile=$(mktemp)
echo "$@" > "$tempfile"
"$editor" "$tempfile"
args=$(cat "$tempfile")
[
{ "text": "0️⃣", "name": "0", "keyword": ":0:" },
{ "text": "1️⃣", "name": "1", "keyword": ":1:" },
{ "text": "🔟", "name": "10", "keyword": ":10:" },
{ "text": "💯", "name": "100", "keyword": ":100:" },
{ "text": "🥇", "name": "1st Place Medal", "keyword": ":1st-place-medal:" },
{ "text": "2️⃣", "name": "2", "keyword": ":2:" },
{ "text": "🥈", "name": "2nd Place Medal", "keyword": "2nd-place-medal:" },
{ "text": "3️⃣", "name": "3", "keyword": ":3:" },
{ "text": "🥉", "name": "3rd Place Medal", "keyword": ":3rd-place-medal:" },
@joshuawagner
joshuawagner / karabiner.edn
Last active March 17, 2024 19:58
karabiner.edn - goku file for my karabiner setup
{
;; ----------------------------------
;; This is my goku file for karabiner.
;; I started with this template: https://gist.github.com/nikolai-cc/02f6b070972840323ae355ef847e91a6
;; ~/Library/Logs/goku.log -- I watch this to make sure that I'm not getting errors.
;; ----------------------------------
;; more info about goku: https://github.com/yqrashawn/GokuRakuJoudo
;; more info about karabiner: https://karabiner-elements.pqrs.org/docs
;; ----------------------------------
@SKaplanOfficial
SKaplanOfficial / RaycastWindowState.js
Created May 30, 2023 12:40
JXA script to check if the Raycast main window is currently open.
(() => {
ObjC.import("CoreGraphics");
const windowList = ObjC.castRefToObject($.CGWindowListCopyWindowInfo($.kCGWindowListOptionAll, $.kCGNullWindowID))
const raycastWindow = windowList.js.find((win) => win.allKeys.containsObject("kCGWindowIsOnscreen") && win.js["kCGWindowLayer"].js == 8 && win.js["kCGWindowOwnerName"].js == "Raycast")
return raycastWindow != undefined
})()
@htlin222
htlin222 / md_to_anki.py
Last active April 5, 2024 05:07
search new markdown recently added, with text ANKI in it. Add to Anki Deck, as a raycast command
# -*- coding: utf-8 -*-
# title: md_to_anki
# date: "2023-05-28"
# @raycast.title Markdown files 🪴 to ANKI
# @raycast.author HTLin the 🦎
# @raycast.description search new markdown recently added, with text ANKI in it. Add to Anki Deck
# @raycast.authorURL https://github.com/htlin222
# @raycast.icon 📚