Skip to content

Instantly share code, notes, and snippets.

@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",
@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>
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:

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 \
@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
@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 / start_verdaccio.bat
Last active March 5, 2023 21:15
verdaccio private npm / win32
@REM Usage:
@REM cd c:\socketsupply\create-socket-app && ..\start_verdaccio && cd ..\socket && sh bin\publish-npm-modules.sh
@REM Requires mingw sh (= git sh) in PATH
@REM requires npm i -g npm-cli-login
@REM Make sure URL doesn't have a trailing slash
@ Use this environment variable in another terminal where you want to use this server instead of npmjs
set NPM_CONFIG_REGISTRY=http://localhost:4873
@REM Clear package storage so we can push the same version again
rm -rf %APPDATA%\verdaccio\storage
@mribbons
mribbons / ini
Created December 17, 2022 10:40
socket.ini (desktop, mainly mac)
;
; Default configuration file for ssc v0.1.0 (111f9f7).
;
; The shell command to execute when building an application. This is the most
; important command in this file. This will do all the heavy lifting and should
; handle 99.9% of your use cases for moving files into place or tweaking
; platform-specific artifacts.
build = "node build.js"
@mribbons
mribbons / ini
Created December 17, 2022 10:32
android socket.ini
# Build Settings
input = "src"
build = "node build.js"
output = "dist"
executable = "SSCAndroid"
# Package Metadata
version = "0.0.1"
revision = "1"
@mribbons
mribbons / tsconfig.json
Created June 22, 2022 04:59
shared yarn workspace package with tst-reflect issues
{
"include": ["src"],
"references": [],
"extends": "../../tsconfig.build.json",
"compilerOptions": {
"composite": true,
"incremental": true,
"rootDir": "./src",
"outDir": "./dist",
"plugins": [{ "transform": "tst-reflect-transformer" }],