- ⌘-t --> Go to Today
- ctrl-a --> go to beginning of terminal line
- ctrl-e --> go to end of terminal line
- alt-click --> go to character
| // Per the BNR iOS programming guide's chapter on creating BNRItem | |
| import Cocoa | |
| import Foundation | |
| extension Character { | |
| func unicodeIntValue() -> UInt32 | |
| { | |
| let str = String(self) | |
| return str.unicodeScalars[str.unicodeScalars.startIndex].value | |
| } |
| class Array | |
| # find_insert_index -> returns the index that the value should be inserted into | |
| # to keep the array sorted | |
| # Arguments | |
| # val -> any sort of value that supports comparison or... | |
| # &block -> If you want to compare a specific field on your object you could: | |
| # {|x,y| x.FIELD <=> y.FIELD } | |
| # or you could sort reverse: | |
| # {|x,y| y <=> x} NOTE: your review must be sorted desc. for this to work. |
You know what method is being and you want to figure out how it got there. Raising an exception is a bit harsh since all you want is a stack trace
puts caller
Seriously. It's that easy. If you're getting too much information you could
OS X Mavericks has some some seriously awesome dual screen support (Mutha-Fuckin' finally, AMIRITE?) but there seems to be a bug if you have your docked pinned to either side of your display.
Unfortunately, it means moving your dock :-(
Sad times my friends.
Bootstrap 3.0 gives you access to the awesome icon set icon set by these dudes but it's not obvious for a Rails newbie like myself to get it all working together nicely
RAILS_ROOT/vendor/assets/stylesheet/bootstrap-glyphicons.css/dist/fonts from the Bootstrap 3.0 download to a new folder in your Rails app RAILS_ROOT/vendor/assets/fontsconfig.assets.paths << Rails.root.join("vendor","assets", "fonts") to application.rb after the line that has class Application < Rails::Application.bootstrap-glyphicons.css modify the the `urlIt's a collection of CSS styles and Javascript add-ons that stop your site from looking like a shitty craigslist rip off from 1996. Seriously, who wants that?
Docs: CSS, Components, Javascript
Finding the right gem, keeping it updated, and learning the syntax is a pain in the ass. Why not install Bootstrap the way you'd install new javascript libraries?
| import os | |
| import sys | |
| import readline | |
| import glob | |
| class tabCompleter(object): | |
| """ | |
| A tab completer that can either complete from | |
| the filesystem or from a list. | |