- You can store a price in a floating point variable.
- All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
- All currencies are subdivided in decimal units (like dinar/fils)
- All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
- All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
- Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
- For any currency you can have a price of 1. (ZWL)
- Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)
  
    
      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
    
  
  
    
  | # config/initializers/sidekiq.rb | |
| if Sidekiq.server? | |
| config = ActiveRecord::Base.connection.pool.spec.config | |
| ActiveRecord::Base.establish_connection(config.merge(pool: Sidekiq.options.fetch(:concurrency))) | |
| end | 
Prerequisites:
- One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
- A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.
Software components used:
  
    
      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
    
  
  
    
  | def build_path | |
| "build/iPhoneOS-6.0-Release/" | |
| end | |
| def ipa_name | |
| '"Today\'s Shirts.ipa"' | |
| end | |
| def dsym_name | |
| '"Today\'s Shirts.dSYM"' | 
  
    
      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
    
  
  
    
  | # spec/support/timezone.rb | |
| module TimeZoneHelpers | |
| extend ActiveSupport::Concern | |
| def self.randomise_timezone! | |
| offsets = ActiveSupport::TimeZone.all.group_by(&:formatted_offset) | |
| zones = offsets[offsets.keys.sample] # Random offset to better vary the time zone differences | |
| Time.zone = zones.sample # Random zone from the offset (can be just 1st, but let's do random) | |
| puts "Current rand time zone: #{Time.zone}. Repro: Time.zone = #{Time.zone.name.inspect}" | |
| end | 
  
    
      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
    
  
  
    
  | # Changing terminal color in MacOSX when SSHing (so you know at a glance that you're no longer in Kansas) | |
| # Adapted from http://www.rngtng.com/2011/01/14/mac-os-x-terminal-visual-indication-for-your-ssh-connection/ | |
| # 1. Create a theme in your terminal setting with the name "SSH" and the desired colors, background, etc. | |
| # 2. Add this to your .bash_profile (or .bashrc, I always forget the difference ;)) | |
| # 3. Optional but useful: in the terminal, go to Settings > Startup and set "New tabs open with" to | |
| # "default settings" (otherwise, if you open a new tab from the changed one, you get a local tab with | |
| # the SSH colors) | |
| function tabc() { | |
| NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi # if you have trouble with this, change | 
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
  
    
      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
    
  
  
    
  | @implementation UITextView (RSExtras) | |
| static BOOL stringCharacterIsAllowedAsPartOfLink(NSString *s) { | |
| /*[s length] is assumed to be 0 or 1. s may be nil. | |
| Totally not a strict check.*/ | |
| if (s == nil || [s length] < 1) | |
| return NO; | 
  
    
      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
    
  
  
    
  | source :rubygems | |
| gem "rake" | |
| gem 'motion-logger' #cocoalumberjack wrapper | 
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.