I hereby claim:
- I am gjones on github.
- I am garethjones (https://keybase.io/garethjones) on keybase.
- I have a public key ASASrzHbPodmQplU1Yh2hst-pvEgAN6Q5b0duIBl58V1kgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import UIKit | |
| extension UIDevice { | |
| public var isiPadPro12: Bool { | |
| if UIDevice.current.userInterfaceIdiom == UIUserInterfaceIdiom.pad | |
| && (UIScreen.main.bounds.size.height == 1366 || UIScreen.main.bounds.size.width == 1366) { | |
| return true | |
| } | |
| return false |
| func fetchResultsFromApi() { | |
| let username = "username" | |
| let password = "password" | |
| let url = NSURL(string: "http://localhost:3000/api/v1/results.json") | |
| let request = NSMutableURLRequest(url: url! as URL) | |
| let config = URLSessionConfiguration.default | |
| let userPasswordString = "\(username):\(password)" | |
| let userPasswordData = userPasswordString.data(using: String.Encoding.utf8) |
| server "#{Rails.application.secrets.server_port}", port: 22, roles: [:web, :app, :db], primary: true | |
| set :repo_url, "#{Rails.application.secrets.git_address}" | |
| set :application, "#{Rails.application.secrets.application_name}" | |
| set :user, "#{Rails.application.secrets.application_user}" | |
| set :puma_threads, [4, 16] | |
| set :puma_workers, 0 | |
| # Don't change these unless you know what you're doing | |
| set :pty, true |
| # Write a program that prints the numbers from 1 to 100. | |
| # For multiples of three print "Fizz" instead of the number | |
| # For multiples of five print "Buzz". For numbers which | |
| # For multiples of both three and five print "FizzBuzz". | |
| 1.step(100,1) do |input| | |
| if (input % 5) == 0 && (input % 3) == 0 | |
| puts 'FizzBuzz' | |
| elsif (input % 5) == 0 | |
| puts 'Buzz' |
| // Project: ExampleTestApp | |
| // ViewController.swift | |
| func isNumberEven(num: Int) -> Bool { | |
| if num %2 == 0 { | |
| return true | |
| } else { | |
| return false | |
| } |
| // Write a program that prints the numbers from 1 to 100. | |
| // For multiples of three print "Fizz" instead of the number | |
| // For multiples of five print "Buzz". For numbers which | |
| // For multiples of both three and five print "FizzBuzz". | |
| for number in 1...100 { | |
| if (number % 15 == 0) { | |
| println("FizzBuzz") | |
| } | |
| else if (number % 3 == 0) { |