Skip to content

Instantly share code, notes, and snippets.

@mribbons
mribbons / socket-libwebkitgtk-4.0.dev.diff
Created May 18, 2023 23:41
Socket Runtime libwebkitgtk-4.0 Patch
diff --git a/bin/cflags.sh b/bin/cflags.sh
index 3002f2e6..dde212e5 100755
--- a/bin/cflags.sh
+++ b/bin/cflags.sh
@@ -81,7 +81,7 @@ if (( !TARGET_OS_ANDROID && !TARGET_ANDROID_EMULATOR )); then
if [[ "$host" = "Darwin" ]]; then
cflags+=("-ObjC++")
elif [[ "$host" = "Linux" ]]; then
- cflags+=($(pkg-config --cflags --static gtk+-3.0 webkit2gtk-4.1))
+ cflags+=($(pkg-config --cflags --static gtk+-3.0 webkit2gtk-4.0))
@mribbons
mribbons / autogen_get_output_files.py
Created October 29, 2023 09:27
Files from latest autogen inference
# Usage:
# python autogen_get_output_files.py
# * Currently only the latest cache entry is processed for # filenames
# * .db location may need to be adjusted, I have no idea how the db file is named
# files are saved in _output
import os
import sqlite3
import json

OpenCV / C++ Setup / Ubuntu / vscode

sudo apt install -y --no-install-recommends git build-essential gdb cmake ninja-build
sudo apt-get install -y --no-install-recommends libpng libjpeg-turbo libwebp tiff openexr jasper openblas zlib ffmpeg
sudo apt-get install -y --no-install-recommends \
libgtk2.0-dev \
pkg-config \
libavcodec-dev \
libavformat-dev \
let [ year, month, day ] = [2024, 9, 12]
let scaryDate = new Date()
scaryDate.setFullYear(year)
scaryDate.setMonth(month - 1) // set month input is zero based
scaryDate.setDate(day)
console.log(`🦇`, scaryDate, `🦇`)
// output:
@mribbons
mribbons / VSCode.idekeybindings
Created August 4, 2025 09:13
Make XCode like VSCode. Use ^1, ^2 instead of CTRL+TAB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Menu Key Bindings</key>
<dict>
<key>Key Bindings</key>
<array>
<dict>
<key>Action</key>
@mribbons
mribbons / keybindings.json
Created August 27, 2025 07:35
vscode macos keybinds
// ~/Library/Application Support/Code/User/keybindings.json
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "shift+cmd+right",
"command": "-workbench.action.terminal.sendSequence",
"when": "terminalFocus && terminalShellIntegrationEnabled && !accessibilityModeEnabled && terminalShellType == 'pwsh'"
},
{
"key": "shift+cmd+left",