Skip to content

Instantly share code, notes, and snippets.

View jus-jus's full-sized avatar
:octocat:
@ Vilnius

Justin jus-jus

:octocat:
@ Vilnius
View GitHub Profile
@jus-jus
jus-jus / gist:a5cf5c5948e4948b4b450ea2ed84c41b
Last active June 15, 2023 14:53
Enable macOS to move window pressing anywhere on the window
In shell:
> defaults write -g NSWindowShouldDragOnGesture -bool true
Then log out from current macOS session
Press ⌘ + ⌃ + click any part if the window
To disable this behaviour:
> defaults delete -g NSWindowShouldDragOnGesture
@jus-jus
jus-jus / gist:36b26d1b6eddb35dd4af5a67df5a2cb3
Created February 8, 2018 15:52
Shorter version of unique id in JS. When UUID v1 or v4 is too long
Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString('36')
@jus-jus
jus-jus / gist:6838ec5edf5df4886ad0a0fa436ed160
Last active February 8, 2018 22:16
Alias to delete merged branches
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
@jus-jus
jus-jus / gist:d9ee3a880dd663625396e4a47240a0b3
Created February 6, 2018 17:52
Pull multiple git repositories at the current directory
#!/bin/sh
# Script checks every dir in current directory and pulls it if it is git repository
for d in `ls -d *`
do
if [ -d $d/.git ]
then
echo "--- Pulling \033[1;32m$d ---\033[0m"
echo `cd $path$d; git pull -r`
fi
done