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
| https://gist.github.com/MohamedAlaa/2961058 |
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
| # http://serverfault.com/questions/54736/how-to-check-if-a-library-is-installed | |
| # work 99% of the time | |
| alias libcheck='ldconfig -p | grep ' | |
| # other ways | |
| # for deb-based distribution | |
| # dpkg -s packagename | |
| # for exact filename search | |
| # locate filename |
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
| http://www.thegeekstuff.com/2010/07/bash-string-manipulation/ |
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
| http://backreference.org/2013/05/22/send-email-with-attachments-from-script-or-command-line/ |
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
| (defun get-ip-address (&optional dev) | |
| "Get the IP-address for device DEV (default: eth0) of the current machine." | |
| (let ((dev (if dev dev "eth0"))) | |
| (format-network-address (car (network-interface-info dev)) t))) |
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
| # read in username and password for system http(s) proxy settings | |
| read -s -p "Username: " USERNAME; echo '' | |
| read -s -p "Password: " PASSWORD; echo '' | |
| read -s -p "HTTP(S) Proxy (host:port): " HTTP_PROXY_HOST_PORT; echo '' | |
| export {http_proxy,https_proxy}="http://$USERNAME:$PASSWORD@$HTTP_PROXY_HOST_PORT" | |
| # update http(s) proxy settings for git | |
| git config --global http.proxy $http_proxy | |
| git config --global https.proxy $https_proxy |
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
| https://robots.thoughtbot.com/vim-splits-move-faster-and-more-naturally |
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
| - Create a temporary branch, switch to it | |
| - Edit multiple files, commit each file separately | |
| - Make pull request | |
| - Merge pull request and delete temporary branch |
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
| # This script aims to fix errors similar to below: | |
| # | |
| # /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file ... | |
| # from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' | |
| # | |
| # The error is commonly stumbled upon in Mac OS X El Capitan. | |
| # fix access permission issue with the new Mac's SIP process | |
| sudo chown -R $(whoami):admin /usr/local |
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
| export LANGUAGE=en_US.UTF-8 | |
| export LC_ALL=en_US.UTF-8 | |
| export LANG=en_US.UTF-8 | |
| export LC_TYPE=en_US.UTF-8 |