#Asset Pipeline
#Bullet Points
- Rails Guides Asset Pipeline
- Any file in any subfolder:
app/assets,lib/assets,vendor/assets, + gems...
- demo text file in assets subfolder
- JavaScript
- concatenate <- In Production
| import Foundation | |
| /// NSURLSession synchronous behavior | |
| /// Particularly for playground sessions that need to run sequentially | |
| public extension NSURLSession { | |
| /// Return data from synchronous URL request | |
| public static func requestSynchronousData(request: NSURLRequest) -> NSData? { | |
| var data: NSData? = nil | |
| let semaphore: dispatch_semaphore_t = dispatch_semaphore_create(0) |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>PizzaShack</title> | |
| <%= stylesheet_link_tag 'application', media: 'all' %> | |
| <%= javascript_include_tag 'application' %> | |
| <%= csrf_meta_tags %> | |
| </head> | |
| <body> |
#Asset Pipeline
#Bullet Points
app/assets, lib/assets, vendor/assets, + gems...| def hanoi(n, fr, to, spare): | |
| '''(int, str, str, str) | |
| Solve the classic puzzle Tower of Hanoi | |
| >>> hanoi(1, "Middle", "Left", "Right") | |
| - Move top ring in 'Middle' tower to the 'Left' tower | |
| ''' | |
| def print_move(fr, to): | |
| print "- Move top ring in '{}' tower to the '{}' tower".format(fr, to) |