Skip to content

Instantly share code, notes, and snippets.

View pgrepds's full-sized avatar

David Scholz pgrepds

View GitHub Profile
git config --global "Email Adress"
git config --global "David Scholz"
git config --global commit.gpgSign true
git config --global user.signingKey <pgp key>
We can show the PGP keys as follows:
gpg --list-keys
sudo kill -9 $(sudo lsof -t -i:1234)
pgrepds / gist:cbd2b0d1677607af3613a3eff8cb3c39
Created June 2, 2022 00:06
Remove last x commits from server
// we should be careful here.
git reset --hard HEAD~x
git push -f
Check if any pulseaudio instance is running:
pulseaudio --check
Kill pulseaudio:
pulseaudio -k
pgrepds / gist:5eca42a14d27b83c8ea82d861bd0f919
Created May 29, 2022 23:41
Fish terminal window title bar: reflect up to 4 subpaths
Create a file named `` ins `~/.config/fish/functions` and add the following content.
function fish_title
set -q argv[1]; or set argv fish
echo (fish_prompt_pwd_dir_length=4 prompt_pwd): $argv;
pgrepds / gist:416d3ef72cebc252742c6ca366eb5cef
Created May 29, 2022 20:43
Create Matlab desktop entry on GNOME
Execute the following command.
sudo nvim /usr/share/applications/matlab.desktop
Add the following content.
[Desktop Entry]
pgrepds / gist:7c9a7e29a8b649369951e2002a85a3d0
Last active June 28, 2024 16:25
Matlab R2022a ArchLinux installer problem fix
I got problems installing Matlab R2022a on Arch. Running the installer throws the following error:
terminate called after throwing an instance of 'std::runtime_error'
what(): Failed to launch web window with error: Unable to launch the MATLABWindow application. The exit code was: 127
fish: Job 1, 'sudo ./install' terminated by signal SIGABRT (Abort)
I fixed it by running the following commands.
rm ~/Library/Caches/CocoaPods
rm -rf ~/Library/Developer/Xcode/DerivedData
Inside project directory
cd ios
pod deintegrate
pod setup
pod install
sudo gem install cocoapods
Update pod
pod setup
Confirm via
pods --version
pgrepds / gist:6613bdc079f42e440a8548371e762301
Created April 1, 2022 05:55
react-native start specific ios simulator from the command line
List all available devices.
xcrun simctl list devices
Start device
npx react-native run-ios --simulator="iPhone SE (1st generation)"