- Get it
- Preference changes to get certain shortcuts to behave the same as the rest of the system:
- Preferences -> profiles -> Keys
- Left option key: +Esc
- Option-left: Send Escape sequence: b
- Option-right: Send Escape sequence: f
- Other settings
- Transparency
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
| #!/bin/sh | |
| # homebrew-cask | |
| brew tap phinze/homebrew-cask | |
| brew install brew-cask | |
| # browser | |
| brew cask install firefox-aurora | |
| brew cask install google-chrome | |
| brew cask install google-chrome-canary |
Decorators are used to add new functionality to an already existing object by "wrapping" it with new methods, without effecting other instances of that object. Thus, decorators are a perfect example of the Open/closed principle, in which an object is "open for extension" but "closed for modification"; you should be able to add new behavior to application without changing it's underlying source code. If any of this is a bit hard to swallow, I would
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
| # There was a day where I have too many color schemes in iTerm2 and I want to remove them all. | |
| # iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one. | |
| # iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format | |
| # What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files. | |
| $ cd /tmp/ | |
| $ cp ~/Library/Preferences/com.googlecode.iterm2.plist . | |
| $ plutil -convert xml1 com.googlecode.iterm2.plist | |
| $ vi com.googlecode.iterm2.plist |
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
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
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
| #!/bin/sh | |
| echo Install all AppStore Apps at first! | |
| # no solution to automate AppStore installs | |
| read -p "Press any key to continue... " -n1 -s | |
| echo '\n' | |
| echo Install and Set San Francisco as System Font | |
| ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)" | |
| echo Install Homebrew, Postgres, wget and cask | |
| ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
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
| #!/usr/bin/expect -f | |
| # | |
| # VIPAccess.exp | |
| # | |
| # Command-line emulation of Symantec's VIP Access software token. | |
| # Usage: | |
| # ./VIPAccess.exp [v] | |
| # If the "v" argument (or any argument) is specified, verbose output | |
| # will be produced on stderr. The OTP value will be output on stdout. | |
| # |
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
| h = { | |
| 'a' => :a_value, | |
| 'b' => nil, | |
| 'c' => false | |
| } | |
| h.fetch('a', :default_value) #=> :a_value | |
| h.fetch('b', :default_value) #=> nil | |
| h.fetch('c', :default_value) #=> false | |
| h.fetch('d', :default_value) #=> :default_value |
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
| require 'benchmark' | |
| # | |
| # Code example for my blogpost | |
| # | |
| # Hash lookup in Ruby, why is it so fast? | |
| # | |
| # | |
| # Struct used to store Hash Entries |