Skip to content

Instantly share code, notes, and snippets.

View iamludal's full-sized avatar
🚀

Ludal iamludal

🚀
View GitHub Profile
@iamludal
iamludal / .bashrc
Created January 29, 2021 15:16
Display the status code of the last executed command. Add this snippet to your .bashrc or .zshrc file.
col_success="$(tput setaf 10)"
col_failure="$(tput setaf 9)"
col_normal="$(tput sgr0)"
col_fade="$(tput setaf 15)"
function _prompt_() {
local code="$?"
if [ "$code" -ne 0 ];
then
@iamludal
iamludal / delete_github_workflow_runs.sh
Created December 24, 2023 16:15
Delete all GitHub workflow runs for a given workflow
#!/bin/bash
workflow=$1
limit=$2
if [[ -z "$workflow" ]]
then
echo "Usage: $0 <workflow> [<limit>]"
exit 1
fi
@iamludal
iamludal / cacerts-permissions.sh
Created February 22, 2024 07:49
Set Android permissions for system cacerts.
# Update the perms & selinux context labels, so everything is as readable as before
chown root:root /system/etc/security/cacerts/*
chmod 644 /system/etc/security/cacerts/*
chcon u:object_r:system_file:s0 /system/etc/security/cacerts/*
@iamludal
iamludal / macos-dock-sensitivity.sh
Created April 18, 2024 12:55
Increase macOS dock sensitivity
defaults write com.apple.dock autohide-delay -int 0
defaults write com.apple.dock autohide-time-modifier -float 0.4
killall Dock