This file contains 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
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
let rootViewController = MainTableViewController() |
This file contains 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
let storyboard = UIStoryboard(name: "STORYBOARD_NAME", bundle: nil) | |
let nextVC = storyboard.instantiateViewControllerWithIdentifier("STORYBOARD_ID_OF_VC_CLASS") as! UIViewController | |
navigationController?.pushViewController(nextVC, animated: true) |
This file contains 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
import UIKit | |
import Alamofire | |
import SwiftyJSON | |
・ | |
・ | |
・ | |
Alamofire.request(.GET, "http://foo.com/api/v1/bar/1", parameters: ["foo": "bar"]) | |
.response { (request, response, data, error) in | |
println(request) | |
println(response) |
This file contains 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
namespace :api do | |
get '/test' => 'tests#index' | |
end | |
=> | |
GET /api/test(.:format) api/tests#index |
This file contains 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
$ curl -H "Content-Type: application/json" -d '{"user":{"email":"hoge@hoge.hoge","password":"12345678"}}' -X POST http://localhost:3000/api/v1/users |
This file contains 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
Started GET "/admin" for ::1 at 2015-05-12 18:06:23 +0900 | |
Processing by Admin::DashboardController#index as HTML | |
Completed 401 Unauthorized in 0ms |
This file contains 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
$ npm install -g cordova ionic |
This file contains 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
$ git push origin master | |
Counting objects: 26593, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (24906/24906), done. | |
Writing objects: 100% (26593/26593), 157.41 MiB | 160.00 KiB/s, done. | |
Total 26593 (delta 4255), reused 0 (delta 0) | |
remote: error: GH001: Large files detected. | |
remote: error: Trace: | |
remote: error: See http://git.io/iEPt8g for more information. | |
remote: error: File vendor/bundle/ruby/2.2.0/gems/libv8-3.16.14.7-x86_64-darwin-14/vendor/v8/out/x64.release/libv8_base.a is 150.14 MB; this exceeds GitHub's file size limit of 100 MB |
This file contains 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 check | |
true if hoge.present? && fuga.present? | |
end |
This file contains 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
# encoding: utf-8 | |
namespace :screenshot do | |
desc "get screenshot from official_url and save tmp/screenshots/" | |
task :get => :environment do | |
quality = 100 | |
aspect_width = 4 | |
aspect_height = 3 # height : width = 4 : 3 | |
width = 1200 | |
height = width * 3 /4 |
NewerOlder