Skip to content

Instantly share code, notes, and snippets.

@aelkz
Last active November 26, 2022 21:35
Show Gist options
  • Save aelkz/15eb367e9c2c851b2a6a3efd9a2d5b18 to your computer and use it in GitHub Desktop.
Save aelkz/15eb367e9c2c851b2a6a3efd9a2d5b18 to your computer and use it in GitHub Desktop.
osx dev tweaks

https://www.titanium-software.fr/en/deeper.html
https://scriptingosx.com/2018/10/changing-a-users-login-picture/
ohmyzsh/ohmyzsh#6713,
https://www.youtube.com/watch?v=EVlc5G3TzYE
https://www.youtube.com/watch?v=F-7s8NOLoPQ
https://gist.github.com/aelkz/f087f7279f3247e0d16132639d75c3f8
https://redhat.service-now.com/rh_ess/kb_view.do?sys_kb_id=d5a3e7da4fc38200d2c390918110c7bf&sysparm_language=&sysparm_nameofstack=&sysparm_kb_search_table=&sysparm_search=https://redhat.service-now.com/help?id=kb_article&sysparm_article=KB0005420
https://www.maketecheasier.com/fix-home-end-button-for-external-keyboard-mac/
https://discussions.apple.com/thread/8555674
https://codeburst.io/8-must-know-terminal-commands-and-tips-for-productivity-mac-edition-95935dba3ebc
https://zen-of-programming.com/terminal-setup/
https://github.com/mashaal/wild-cherry
https://gist.github.com/BretFisher/6f688dde0122399efdca5a9d26100437
https://github.com/mashaal/wild-cherry
https://apple.stackexchange.com/questions/34871/how-to-view-root-directory-and-subdirectories-in-finder

ANSIBLE

https://github.com/geerlingguy/mac-dev-playbook
https://github.com/ansible-macos/macos-playbook
https://github.com/mathiasbynens/dotfiles
https://github.com/paulirish/dotfiles
http://dotfiles.github.io

OSX Password Policies

https://apple.stackexchange.com/questions/337468/how-to-set-a-short-user-password-in-macos-mojave-and-later-10-14

pwpolicy getaccountpolicies > ~/Desktop/file.plist
vim ~/Desktop/file.plist

# delete the first line which says: Getting global account policies

policyAttributePassword matches '^$|.{4,}+'

pwpolicy setaccountpolicies ~/Desktop/file.plist

passwd

JAVA

Slow start of java applications
https://stackoverflow.com/questions/33289695/inetaddress-getlocalhost-slow-to-run-30-seconds/33289897#33289897
https://apple.stackexchange.com/questions/66611/how-to-change-computer-name-so-terminal-displays-it-in-mac-os-x-mountain-lion

APPLICATIONS

ALT+TAB replacement https://contexts.co/

Network packets analyzer "Wireshark" (PCAP) https://debookee.com/

PODMAN

containers/podman#3882 containers/podman#4364

INTELLIJ AND SUBLIME

To navigate to a hidden system folder from the Finder:
Open Finder.
Press Command+Shift+G. A dialog box opens.
Enter the path to the folder you want to access, for example /usr/discreet/.
Optional: You can drag the folder icon to the Finder favorites bar for easier access in the future.

Sublime context menu

https://gist.github.com/idleberg/fc0df222e1df258d525d704042d72582 https://gist.github.com/aelkz/1282250138b90ce2cd6ae8101f772d78

https://tinyapps.org/blog/202102010700_sublime_text_keyboard_shortcut.html

Uninstall IntelliJ

https://www.testingexcellence.com/uninstall-intellij-mac-os/
https://nektony.com/how-to/uninstall-intellij-on-mac
https://nektony.com/how-to/uninstall-intellij-on-mac

YOUTUBE-DL

https://techwiser.com/how-to-install-youtube-dl-on-mac/

Press Command+Space and type Terminal and press enter/return key.
Run in Terminal app:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null and press enter/return key.
If the screen prompts you to enter a password, please enter your Mac's user password to continue. When you type the password, it won't be displayed on screen, but the system would accept it. So just type your password and press ENTER/RETURN key. Then wait for the command to finish.
Run:
brew install youtube-dl
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl sudo chmod a+rx /usr/local/bin/youtube-dl brew install youtube-dl ffmpeg

WGET w/ OpenSSL for TLS support

brew install wget --with-libressl

ZSH + POWERLEVEL9K CONFIG

https://gist.github.com/aelkz/342f3ce7eb2e5f4fe4c864e6cc007641

ZSH auto-suggestions

https://github.com/bhilburn/powerlevel9k/wiki/Show-Off-Your-Config

MANUAL

git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh

OH-MY-ZSH

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions edit ~/.zshrc plugins=(zsh-autosuggestions)

COLORLS

https://github.com/athityakumar/colorls

NEOFETCH

https://medium.com/@rafavinnce/iterm2-zsh-oh-my-zsh-material-design-the-most-power-full-terminal-on-macos-332b1ee364a5
https://github.com/dylanaraps/neofetch/wiki/Image-Backends
https://github.com/dylanaraps/neofetch/wiki/Images-in-the-terminal
https://www.youtube.com/watch?v=i0jtvTIOMWs

DISABLE LAST LOGIN INFO

http://osxdaily.com/2010/06/22/remove-the-last-login-message-from-the-terminal/

IMPROVE PERFORMANCE (copy & paste)

https://apple.stackexchange.com/questions/312795/zsh-paste-from-the-clipboard-a-command-takes-a-few-second-to-be-write-in-the-ter
ohmyzsh/ohmyzsh#5569

RUBY

http://codingpad.maryspad.com/2017/04/29/update-mac-os-x-to-the-current-version-of-ruby/
https://medium.com/@IanRahman/how-to-upgrade-ruby-on-a-mac-a592c6085c63
https://usabilityetc.com/articles/ruby-on-mac-os-x-with-rvm/
https://www.engineyard.com/blog/how-to-install-ruby-on-a-mac-with-chruby-rbenv-or-rvm

brew install rbenv ruby-build

  • Add rbenv to bash so that it loads every time you open a terminal
    echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
    source ~/.bash_profile

  • Install Ruby rbenv install 2.6.3
    rbenv global 2.6.3
    ruby -v

iTerm2 (tweaks)

ALT+LEFT and ALT+RIGHT navigation: https://www.clairecodes.com/blog/2018-10-15-making-the-alt-key-work-in-iterm2/

⌥← (escape sequence: b) ⌥→ (escape sequence:f )

SSH Timeout

https://gist.github.com/extrabacon/10769878
https://stackoverflow.com/questions/30078348/google-cloud-ssh-timeout-how-to-increase-session-time
https://unix.stackexchange.com/questions/2010/what-does-the-broken-pipe-message-mean-in-an-ssh-session
https://deeb.me/20190115/packet_write_wait-connection-to-xxx-port-22-broken-pipe
https://askubuntu.com/questions/127369/how-to-prevent-write-failed-broken-pipe-on-ssh-connection

sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd

Audience DISTRACTION

http://geektyper.com/tegnio/

VSCode HACKS

https://www.freecodecamp.org/news/here-are-some-super-secret-vs-code-hacks-to-boost-your-productivity-20d30197ac76/
https://github.com/microsoft/vscode-tips-and-tricks

SublimeText v3 HACKS

https://github.com/equinusocio/material-theme

Remove SentinelONE

https://gist.github.com/Ambroos/f6f37398e3aecd7da467cbcf85d5299b

Finder Extensions

https://github.com/Ji4n1ng/OpenInTerminal

Chrome Extensions

https://chrome.google.com/webstore/detail/bookmark-sidebar/jdbnofccmhefkmjbkkdkfiicjkgofkdh?hl=en

VMWare Fusion

cat ~/Virtual\ Machines.localized/rhel78-8GiB-minimal_jdg01.vmwarevm/rhel78-8GiB-minimal_jdg01.vmx | grep ethernet0.generatedAddress

vim /Library/Preferences/VMware Fusion/vmnet8/dhcp.conf

Take note of the line starting with range. The IP addresses you will assign your guest machines will need to fall outside that range. Search for ####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" ####### and add:

host rhel8-jdg01 {
    hardware ethernet 00:0c:29:9d:2a:38;
    fixed-address 172.16.179.102;
}
sudo /Applications/VMware\ Fusion.app/Contents/Library/services/services.sh --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/services/services.sh --start

https://gist.github.com/pjkelly/1068716/921c8b62ca07e29a7312e81e7b2efa88b69858ab

Podman & Skopeo

https://itnext.io/podman-and-skopeo-on-macos-1b3b9cf21e60

JWT CLI (osx)

https://github.com/mike-engel/jwt-cli

Windows Remote Desktop

https://www.freecodecamp.org/news/ec2-with-microsoft-remote-desktop/

Hide desktop icons

defaults write com.apple.finder CreateDesktop false
killall Finder

defaults write com.apple.finder CreateDesktop true
killall Finder

Check system DNS addresses

scutil --dns | grep 'nameserver\[[0-9]*\]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment