(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/usr/bin/env ruby | |
| require 'mechanize' | |
| require 'open-uri' | |
| require 'pathname' | |
| require 'fileutils' | |
| require 'pp' | |
| ### BEGIN CUSTOMIZATION | |
| # set this to where you would like the reports to be stored |
| // Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ | |
| var metas = document.getElementsByTagName('meta'); | |
| var i; | |
| if (navigator.userAgent.match(/iPhone/i)) { | |
| for (i=0; i<metas.length; i++) { | |
| if (metas[i].name == "viewport") { | |
| metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; | |
| } | |
| } |
| #!perl | |
| use common::sense; | |
| use HTTP::Request::Common; | |
| use LWP::UserAgent; | |
| use URI; | |
| use Compress::Zlib; | |
| use Perl6::Say; | |
| my $uri = URI->new("https://reportingitc.apple.com/autoingestion.tft"); |
| var page = require('webpage').create(), | |
| address, output, size; | |
| if (phantom.args.length < 2 || phantom.args.length > 3) { | |
| console.log('Usage: rasterize.js URL filename'); | |
| phantom.exit(); | |
| } else { | |
| address = phantom.args[0]; | |
| output = phantom.args[1]; | |
| page.viewportSize = { width: 1280, height: 1024 }; |
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
| { | |
| self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
| self.viewController = [[JBViewController alloc] initWithNibName:@"JBViewController" bundle:nil]; | |
| self.window.rootViewController = self.viewController; | |
| // ADD THIS LINE: | |
| [self.window setTransform:CGAffineTransformMakeScale(0.81, 0.81)]; | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.