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
FBRequestConnection.startForMeWithCompletionHandler({ (connection, result:AnyObject!, error) -> Void in | |
print(result) | |
var userId = result.valueForKey("id") as String | |
var profilePhotoUrl = NSURL(string: "https://graph.facebook.com/\(userId)/picture?type=large") | |
self.profilePicture.sd_setImageWithURL(profilePhotoUrl) | |
self.profilePicture.contentMode = UIViewContentMode.ScaleAspectFill | |
}) |
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
// | |
// SavedContestFileCache.swift | |
// Pingo | |
// | |
// Created by Jeff Potter on 10/16/14. | |
// Copyright (c) 2014 Byron Mackay. All rights reserved. | |
// | |
import Foundation | |
import Swift |
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
-?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="JQc-pO-E3a"> | |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="4Qr-jt-ySZ"> |
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
[ | |
{ | |
"fullDescription" : "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", | |
"imagePathSmall" : "http:\/\/files.parsetfss.com\/e27f6d76-c708-4a58-aaa8-6b6de9cdb37d\/tfss-4f7d1508-a89b-4020-b8b5-866e277d159e-resized.jpg", | |
"adId" : "Contest5ZAifNTc7Z", | |
"endDate" : "Fri, 05 Dec 2014 21:00:00 GMT", | |
"startDate" : "Fri, 21 Nov 2014 2:00:00 GMT", | |
"summary" : "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor inci.", | |
"name" : "Contest 1", | |
"prizeDescription" : "Meet your favorite artist backstage at one of their concerts. Airfare, hotel rooms, and food will be provided.", |
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
class SunilValidation : Validation { | |
// 8 characters. one uppercase, one lowercase, one number | |
var SUNIL_REGEX = "^(?=.*?[A-Z])(?=.*?[0-9])(?=.*?[a-z]).{8,}$" | |
// No length. one uppercase, one lowercase, one number | |
var NO_LENGTH_SUNIL_REGEX = "^(?=.*?[A-Z])(?=.*?[0-9])(?=.*?[a-z]).*$" | |
func validate(value: String) -> (Bool, ValidationErrorType) { | |
if let sunilTest = NSPredicate(format: "SELF MATCHES %@", SUNIL_REGEX) { | |
if sunilTest.evaluateWithObject(value) { |
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
// In your Bridging-Header file | |
#import <AFNetworking/AFNetworking.h> | |
// initialize manager | |
let manager = AFHTTPRequestOperationManager() | |
// set headers | |
manager.requestSerializer.setValue("608c6c08443c6d933576b90966b727358d0066b4", forHTTPHeaderField: "X-Auth-Token") |
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
#!/usr/bin/ruby -rubygems | |
gem "octokit", "~> 3.0" | |
require 'rubygems' | |
require 'octokit' | |
client = OctoKit::Client.new(:login => 'jpotts18', :password => '$uper$ecret') | |
repo = OctoKit.repo 'pardom/ActiveAndroid' |
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
public class PostFromAnyThreadBus extends Bus { | |
private static PostFromAnyThreadBus instance; | |
public synchronized static PostFromAnyThreadBus getInstance() { | |
if (instance == null){ | |
instance = new PostFromAnyThreadBus(); | |
} | |
return instance; | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.ringseven.myveterinarian.app" > | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | |
<!-- GCM --> | |
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> | |
<uses-permission android:name="android.permission.WAKE_LOCK" /> |
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
class DocumentsController < ApplicationController | |
before_action :set_document, only: [:show, :edit, :update, :destroy] | |
before_filter :load_folder | |
# GET /documents | |
# GET /documents.json | |
def index | |
@documents = documents.all | |
end | |