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
# make sure you git pull and bundle before this | |
# save in ~/.irbrc (make a new one if it doesnt exist) | |
if ENV['RAILS_ENV'] | |
require 'rubygems' | |
require 'hirb' | |
require 'wirble' | |
require "pp" | |
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
# sublime preferences | |
{ | |
"update_check": false, | |
"bold_folder_labels": true, | |
"fade_fold_buttons": false, | |
"line_padding_bottom": 1, | |
"line_padding_top": 1, | |
"highlight_line": true, | |
"caret_style": "wide", | |
"tab_size": 2, |
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
color_list = Tags::Color.all.map {|n| n.name} | |
hash = Hash[color_list.map.with_index.to_a] | |
missing_ids = [] | |
Style.joins(:taggings).find_each do |tags| | |
id = tags.id | |
tags.taggings.each do |t| | |
begin | |
name = TagValue.find(t.tag_value_id).name | |
if color_list.include? name |
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
javascript:(function() {window.location=window.location.toString().replace("stylekick.com/","stylekick.com/admin/");})() |
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
# first update | |
yum -y update | |
# install dev tools | |
yum -y groupinstall "Development Tools" | |
# insall rvm for ruby | |
\curl -L https://get.rvm.io | bash -s stable |
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
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
// Override point for customization after application launch. | |
// notification | |
if let options = launchOptions { | |
let notificationPayload: NSDictionary = options[UIApplicationLaunchOptionsRemoteNotificationKey] as NSDictionary | |
// do somehting with the notifications | |
} | |
// Register for Push Notitications, if running iOS 8 |
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
#ifdef DEBUG | |
#define NSLog(...) /* suppress NSLog when in release mode */ | |
#endif |
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
// | |
// GooglePlaces.swift | |
// | |
// Created by Kirby Shabaga on 9/8/14. | |
// ------------------------------------------------------------------------------------------ | |
// Ref: https://developers.google.com/places/documentation/search#PlaceSearchRequests | |
// | |
// Example search | |
// |
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 | |
class ClassName: NSObject, NSCoding { | |
var myVariable: String? | |
override init() {} | |
required init(coder aDecoder: NSCoder) { | |
myVariable = aDecoder.decodeObjectForKey("myVariable") as? String | |
} |
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
// MARK: - Login Button Pressed | |
@IBAction func loginButtonPressed(sender: AnyObject) { | |
MBProgressHUD.showHUDAddedTo(self.view, animated: true) | |
let permissions = ["user_about_me", "public_profile", "email", "user_relationships", "user_birthday", "user_location"] | |
PFFacebookUtils.logInWithPermissions(permissions, { (user: PFUser!, error: NSError!) -> Void in | |
if user == nil { | |
if (error == nil) { | |
println("User cancelled FB login") | |
}else{ | |
println("FB login error: \(error)") |
OlderNewer