Skip to content

Instantly share code, notes, and snippets.

View junkblocker's full-sized avatar

Manpreet Singh junkblocker

View GitHub Profile
@junkblocker
junkblocker / wordle.md
Created February 3, 2022 02:51 — forked from huytd/wordle.md
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@junkblocker
junkblocker / notify-desktop
Last active May 19, 2024 17:19 — forked from digitaltrails/notify-desktop
notify-desktop - linux find and notify desktop session
#!/usr/bin/env bash
# Provides a way for a root process to perform a notify send for each
# of the local desktop users on this machine.
#
# Intended for use by cron and timer jobs. Arguments are passed straight
# to notify send. Falls back to using wall. Care must be taken to
# avoid using this script in any potential fast loops.
#
# X11 users should already have a dbus address socket at /run/user/<userid>/bus
# and this script should work without requiring any initialisation. Should
@junkblocker
junkblocker / btrfs-undelete
Created November 8, 2022 15:21 — forked from Changaco/btrfs-undelete
btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <info@syntax-k.de>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo
@junkblocker
junkblocker / meld_hotfix_sonoma.sh
Created December 20, 2023 05:29 — forked from syneart/meld_hotfix_sonoma.sh
Meld hotfix on MacOS with Sonoma(14) Intel / M1 & M2 & M3 (Apple silicon) CPU [with Rosetta]
### Test on https://github.com/yousseb/meld/releases/tag/osx-20
### OSX - 3.21.0 (r4) Sonoma
#!/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
install_name_tool -change /usr/local/opt/brotli/lib/libbrotlidec.1.dylib @executable_path/../Frameworks/libbrotlidec.1.dylib /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
@junkblocker
junkblocker / deviceConnect2Wifi.sh
Created December 20, 2023 05:31 — forked from syneart/deviceConnect2Wifi.sh
Android debugging over WiFi (use adb)
#!/bin/bash
# This shell script is made by SyneArt <sa@syneart.com>
# Android Studio default path on Mac
adb=~/Library/Android/sdk/platform-tools/adb
function connect() {
device_id=$1
device_ip=`${adb} -s ${device_id} shell ip -f inet addr show wlan0 | grep -e "[0-9].*\/[0-9]*" | awk '{ print $2 }' | sed 's/\/[0-9]*//'`
echo "Android device id: ${device_id}"