-
-
Save jirevwe/c1f5f9a86f0b84b38be995f6e38b29a9 to your computer and use it in GitHub Desktop.
Mac OSX Bash Profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8. WEB DEVELOPMENT | |
# --------------------------------------- | |
alias apacheEdit='sudo edit /etc/httpd/httpd.conf' # apacheEdit: Edit httpd.conf | |
alias apacheRestart='sudo apachectl graceful' # apacheRestart: Restart Apache | |
alias editHosts='sudo edit /etc/hosts' # editHosts: Edit /etc/hosts file | |
alias herr='tail /var/log/httpd/error_log' # herr: Tails HTTP error logs | |
alias apacheLogs="less +F /var/log/apache2/error_log" # Apachelogs: Shows apache error logs | |
httpHeaders () { /usr/bin/curl -I -L $@ ; } # httpHeaders: Grabs headers from web page | |
# httpDebug: Download a web page and show info on what took time | |
# ------------------------------------------------------------------- | |
httpDebug () { /usr/bin/curl $@ -o /dev/null -w "dns: %{time_namelookup} connect: %{time_connect} pretransfer: %{time_pretransfer} starttransfer: %{time_starttransfer} total: %{time_total}\n" ; } | |
# --------------------------------------- | |
# 9. REMINDERS & NOTES | |
# --------------------------------------- | |
# remove_disk: spin down unneeded disk | |
# --------------------------------------- | |
# diskutil eject /dev/disk1s3 | |
# to change the password on an encrypted disk image: | |
# --------------------------------------- | |
# hdiutil chpass /path/to/the/diskimage | |
# to mount a read-only disk image as read-write: | |
# --------------------------------------- | |
# hdiutil attach example.dmg -shadow /tmp/example.shadow -noverify | |
# mounting a removable drive (of type msdos or hfs) | |
# --------------------------------------- | |
# mkdir /Volumes/Foo | |
# ls /dev/disk* to find out the device to use in the mount command) | |
# mount -t msdos /dev/disk1s1 /Volumes/Foo | |
# mount -t hfs /dev/disk1s1 /Volumes/Foo | |
# to create a file of a given size: /usr/sbin/mkfile or /usr/bin/hdiutil | |
# --------------------------------------- | |
# e.g.: mkfile 10m 10MB.dat | |
# e.g.: hdiutil create -size 10m 10MB.dmg | |
# the above create files that are almost all zeros - if random bytes are desired | |
# then use: ~/Dev/Perl/randBytes 1048576 > 10MB.dat | |
alias adb='~/Library/Android/sdk/platform-tools/adb' | |
alias resetGanache='truffle migrate --compile-all --reset --network ganache' | |
export ANDROID_HOME=/Users/Kornet-Mac-1/Library/Android/sdk | |
export PATH=$ANDROID_HOME/platform-tools:$PATH | |
export PATH=$ANDROID_HOME/tools:$PATH | |
export PATH=$ANDROID_HOME/platform-tools:$PATH | |
export PATH=$ANDROID_HOME/tools:$PATH | |
export PATH="$HOME/.cargo/bin:$PATH" | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
# arewa's work | |
export PATH="$HOME/Library/Haskell/bin:$PATH" | |
export PATH="$HOME/.local/bin:$PATH" | |
case "$-" in | |
*i*) | |
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi | |
;; | |
esac | |
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" | |
# Setting PATH for Python 3.7 | |
# The original version is saved in .bash_profile.pysave | |
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}" | |
export PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment