Skip to content

Instantly share code, notes, and snippets.

View rubeniskov's full-sized avatar
:octocat:
decrypting matrix

Rubén López Gómez rubeniskov

:octocat:
decrypting matrix
View GitHub Profile
@rubeniskov
rubeniskov / composition.schema.json
Created January 16, 2024 23:44
SPZ Dollhouse Composition Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "composition.schema.json",
"additionalProperties": false,
"title": "DollhouseCompositionSchema",
"type": "object",
"properties": {
"version": {
"const": "0.0.1"
},
// remove empty commits
git filter-branch --prune-empty --tag-name-filter cat -- --all
// remove file from history
git filter-branch -f --index-filter 'git rm -rf --cached --ignore-unmatch packages/studio/public/meeting-room.glb' HEAD
@rubeniskov
rubeniskov / launch-kiosk-mode-chrome.sh
Created March 7, 2023 11:04
Launch chrome with kiosk mode and disable user profile
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --kiosk --app=http://localhost:5173/ --profile-directory=none
const global = window.global || window.globalThis || window
const getElementByXpath = (path) =>
document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;

First, import the GPG key.

sudo wget -O- https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/7fa2af80.pub | gpg --dearmor | sudo tee /usr/share/keyrings/nvidia-drivers-linuxcapable.com.gpg

Second, import the repository for your Debian 11 system.,

echo 'deb [signed-by=/usr/share/keyrings/nvidia-drivers-linuxcapable.com.gpg] https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/ /' | sudo tee /etc/apt/sources.list.d/nvidia-drivers.list
@rubeniskov
rubeniskov / find_forwarded_components_without_ref.sh
Last active February 28, 2022 09:16
find_forwarded_components_without_ref.sh
find ./**/src/**/*.tsx -type f -exec grep -l "forwardRef" {} \; | xargs -I{} grep -L "ref=" {}
#
sudo script -t0 /dev/tty1 bash
# send command to tty1
sudo setsid sh -c 'exec /home/pi/vkquake3/ioquake3 <> /dev/tty1 >&0 2>&1'
find $(pwd) -name 'package.json'\
| xargs -I {} cat {}\
| jq '[.name, .dependencies.react, .devDependencies.react,""]\
| join(",")' --raw-output 2>/dev/null|grep -v ,,,
ffmpeg -i input.mov -vf "fps=10,scale=720:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif
@rubeniskov
rubeniskov / cnc1830.config
Created October 22, 2020 17:19
cnc1830.config
$0=10 (step pulse, usec)
$1=25 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=0 (dir port invert mask:00000000)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.010 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)