Skip to content

Instantly share code, notes, and snippets.

@OrionReed
OrionReed / dom3d.js
Last active June 3, 2025 17:52
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@syneart
syneart / meld_hotfix_sonoma.sh
Last active May 16, 2025 08:00
Meld v3.21.0 (r4) hot-fix for macOS on Intel CPU / Apple Silicon CPU with Rosetta
### Test on https://github.com/yousseb/meld/releases/tag/osx-20
### OSX - 3.21.0 (r4) Sonoma
### !!! Note: You need put the Meld.app r4 build to the /Applications path first.
#!/bin/zsh
#Fix libpng16.16.dylib not found
install_name_tool -change /usr/local/opt/libpng/lib/libpng16.16.dylib @executable_path/../Frameworks/libpng16.16.dylib /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
#Fix libbrotlidec.1.dylib not found
@vinayakg
vinayakg / download-images-transform.sh
Last active June 9, 2023 06:18
download-images-transform
#!/bin/bash
# Function to process each file
process_file() {
local file="$1"
local relative_full_path="$2" # Full path of the file
local remote_file_path="http://3.84.160.28/images/$relative_full_path"
# fill an image if its smaller on one of the dimension using center crop
local url="https://mlznzveokpms.i.optimole.com/q:85/rs:fit/$remote_file_path"
@vinayakg
vinayakg / lists.txt
Last active March 27, 2022 06:59 — forked from ScottHelme/lists.txt
My Pi-hole blocklist list.
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
http://sysctl.org/cameleon/hosts
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://v.firebog.net/hosts/AdguardDNS.txt
https://adaway.org/hosts.txt
https://v.firebog.net/hosts/Easyprivacy.txt
https://v.firebog.net/hosts/Prigent-Ads.txt
https://zerodot1.gitlab.io/CoinBlockerLists/hosts
https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt
@vinayakg
vinayakg / linux-commands.sh
Last active March 24, 2024 14:24
Handy Linux commands that have been using for years
Find files size excluding folders in the current directory
`find . -name "*.*" -type f -depth 1 -exec du -ch {} +`
Batch file to delete files older than N days
`forfiles -p "C:\what\ever" -s -m *.* -d <number of days> -c "cmd /c del @path"`
Running a batch program in one line
@vinayakg
vinayakg / find-address-live-traffic.sh
Last active March 24, 2024 14:23
find ip address and their location from live traffic on machine
lsof -iTCP -P | grep Spark | awk '{print $9}' | cut -d '>' -f2 | cut -d ':' -f1 | uniq | xargs -I% curl ipinfo.io/%/org
@vinayakg
vinayakg / brew-cask-m1.txt
Last active August 11, 2024 00:35
Brew cask packages
android-ndk
android-platform-tools
android-sdk
android-studio
appcleaner
arduino
cloudflare-warp
coteditor
dbeaver-community
docker
@vinayakg
vinayakg / install-m1.rb
Last active March 2, 2022 12:15 — forked from skyl/install.rb
Homebrew without sudo
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# SET YOUR_HOME TO THE ABSOLUTE PATH OF YOUR HOME DIRECTORY
# chmod +x install.rb
# ./install.rb
if ARGV.length < 1
puts "Too few arguments, please include the folder name to install your packages there"
exit
end
@vinayakg
vinayakg / cloudSettings
Last active March 2, 2022 12:14
Visual Studio Code Settings Sync
{"lastUpload":"2021-12-12T18:16:37.310Z","extensionVersion":"v3.4.3"}