Skip to content

Instantly share code, notes, and snippets.

@roguesherlock
Last active October 31, 2018 06:37
Show Gist options
  • Save roguesherlock/d46203b6ca7591d54961e8e58bac42a9 to your computer and use it in GitHub Desktop.
Save roguesherlock/d46203b6ca7591d54961e8e58bac42a9 to your computer and use it in GitHub Desktop.
Bunch of Commands that I find it useful
# Check what is causing the slow loading times for fish shell
fish --profile prompt.prof -ic 'fish_prompt; exit'; sort -nk 2 prompt.prof
# check for broken links
find . -type l -xtype l
# fix fedora 25 nvdia problems
# GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/root rhgb quiet rd.driver.blacklist=nouveau"
# That's from my /etc/default/grub.
# Macos Enable auto repition of keys in android studio (for vim plugin)
defaults write -app "Android Studio 3.0 Preview" ApplePressAndHoldEnabled -bool false
# Windows Natural Scroll
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }
# Linux Fix directory and files Permission Recursively
find . -type d -name \* -exec chmod 775 {} \;
find . -type f -exec chmod 644 {} \;
# make compressed image copy of disk/sdcard/any device
dd if=/dev/sdx | gzip > /path/to/image.gz
# restore compressed image copy of disk/sdcard/any device
gzip -dc /path/to/image.gz | dd of=/dev/sdx
# macOS Dock animation options
No animation: defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock
Super-fast animation: defaults write com.apple.dock autohide-time-modifier -float 0.12;killall Dock
Revert to default: defaults delete com.apple.dock autohide-time-modifier;killall Dock
# macOS flush dns
sudo dscacheutil -flushcache; and sudo killall -HUP mDNSResponder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment