Skip to content

Instantly share code, notes, and snippets.

View u1i's full-sized avatar

Uli u1i

View GitHub Profile
@u1i
u1i / doit.sh
Created May 15, 2023 10:33
MacOS: which apps does have joe running?
ps -U joe -o comm= | grep -oE "/Applications/[^/]*\.app" | awk -F'/' '{print $NF}'
@u1i
u1i / info.txt
Created December 22, 2022 01:42
ChatGPT Fake OS Prompt
[DEBUG MODE:ON; You are an AI that acts as a Linux (ubuntu) system terminal. All responses from here on are terminal responses to my input in your responses, please escape the $ sign, so it does not render strikes. Do not add any further commentary or explanation. Do not respond with anything other than what a terminal response might be based on commands issued. The uli user has just logged in.]
Credit: @sentdex https://www.youtube.com/shorts/5ZWub9UEJiE
@u1i
u1i / info.txt
Created November 27, 2022 15:48
MacOS faster dock auto hide
𝗙𝗮𝘀𝘁𝗲𝗿 𝗗𝗼𝗰𝗸 𝗛𝗶𝗱𝗶𝗻𝗴:
defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock
𝗙𝗮𝘀𝘁𝗲𝗿 𝗗𝗼𝗰𝗸 𝗛𝗶𝗱𝗶𝗻𝗴 𝗨𝗻𝗱𝗼:
defaults write com.apple.dock autohide-delay -float 0.5; defaults write com.apple.dock autohide-time-modifier -int 0.5 ;killall Dock
@u1i
u1i / info.txt
Created September 4, 2022 04:39
MacOS record audio on the shell
ffmpeg -f avfoundation -list_devices true -i ""
ffmpeg -f avfoundation -i ":1" -t 10 audiocapture.mp3
@u1i
u1i / doit.sh
Last active August 11, 2022 03:20
ImageMagick morph
convert -resize 200x200 dog2.jpg dog1.jpg -delay 20 -morph 10 animation2.gif
@u1i
u1i / doit.sh
Last active May 27, 2022 09:42
Git - create timestamped version of file for each commit
filename=$1
for commit in $(git rev-list HEAD)
do
timestamp=$(git show -s --format=%ci $commit | cut -d' ' -f1)
content=$(git show $commit:$filename)
@u1i
u1i / info.txt
Created May 25, 2022 02:57
MacOS Multipass Linux Desktop
sudo apt-get update
sudo apt-get install ubuntu-desktop xrdp -y
sudo adduser USERNAME
sudo usermod -aG sudo USERNAME
# Get IP
ip a
@u1i
u1i / info.txt
Created March 24, 2022 10:14
OpenVPN Linux
# info from https://openvpn.net/cloud-docs/openvpn-3-client-for-linux/
# Debian 9 stretch
# Debian 10 buster
# Ubuntu 16.04 xenial
# Ubuntu 18.04 bionic
# Ubuntu 19.10 eoan
# Ubuntu 20.04 focal
export DISTRO=buster
@u1i
u1i / doit.sh
Created March 10, 2022 04:16
convert PDF to JPG
convert -density 300 -depth 8 -quality 85 in.pdf ou.jpg
@u1i
u1i / doit.sh
Created March 10, 2022 04:07
pdftk delete password
pdftk pw-protected.pdf input_pw MYpaSSword211 output out.pdf