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
activity_vc = UIActivityViewController.alloc.initWithActivityItems(["Hey! I thought you might like \"#{item_name}\" \n\nCheck it out here: ", NSURL.URLWithString("http://myqirc.com/?rec="+encoded_rec)], applicationActivities:nil) | |
activity_vc.setValue(item_name, forKey: 'subject') |
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 NotesCell < UITableViewCell | |
def rmq_build | |
rmq(self.contentView).tap do |q| | |
@note = q.append(UILabel, :note_label).get | |
end | |
end | |
def update(data) | |
@note.text = data[:note] | |
@note.lineBreakMode = UILineBreakModeWordWrap |
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 MyController < UIViewController | |
.... | |
def viewDidLoad | |
@note_table = rmq(self.view).append(UITableView, :top_stylesheet).get | |
@note_table_delegate = NoteTableDelegate.new | |
@note_table.delegate = @note_table_delegate | |
@note_table.dataSource = @note_table_delegate | |
@note_table.separatorColor = UIColor.clearColor | |
end | |
... |
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
module Formotion | |
module RowType | |
class QuoteRow < StringRow | |
def add_callbacks(field) | |
super | |
field.should_change? do |field, range, new_string| | |
newlength = field.text.length + new_string.length - range.length | |
if newlength > 34 | |
false | |
else |
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
def application(application, didFinishLaunchingWithOptions:launchOptions) | |
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) | |
initAFNetworkingClient | |
Colors.fetch(AFMotion::Client) do |data| | |
main_controller = ColorController.alloc.initWithData(data) | |
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(main_controller) | |
@window.rootViewController.navigationBar.barTintColor = '#DF533B'.to_color | |
@window.rootViewController.navigationBar.translucent = true | |
@window.rootViewController.navigationBar.tintColor = UIColor.whiteColor | |
@window.rootViewController.navigationBar.setTitleTextAttributes({ |
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 ItemCell < UITableViewCell | |
def rmq_build | |
rmq(self.contentView).tap do |q| | |
# Add your subviews, init stuff here | |
# @foo = q.append(UILabel, :foo).get | |
# | |
# Or use the built-in table cell controls, if you don't use | |
# these, they won't exist at runtime | |
# q.build(self.imageView, :cell_image) |
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 CategoryCell < UITableViewCell | |
def rmq_build | |
rmq(self.contentView).tap do |q| | |
# Add your subviews, init stuff here | |
# @foo = q.append(UILabel, :foo).get | |
# | |
# Or use the built-in table cell controls, if you don't use | |
# these, they won't exist at runtime | |
# q.build(self.imageView, :cell_image) |
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
[ethan@demo ~]$ easy_install | |
easy_install easy_install-2.6 easy_install-2.7 | |
[ethan@demo ~]$ easy_install-2.7 pip | |
error: can't create or remove files in install directory | |
The following error occurred while trying to add or remove files in the | |
installation directory: | |
[Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/test-easy-install-14871.write-test' |
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 MainController < UIViewController | |
.... | |
def display_login | |
animation = CATransition.animation | |
animation.setDuration(1) | |
animation.setType("kCATransitionFade") | |
self.view.layer.addAnimation(animation, forKey:nil) | |
@login = LoginController.alloc.init |
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
<ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2011-08-01"> | |
<OperationRequest> | |
<HTTPHeaders> | |
<Header Name="UserAgent" Value="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36"/> | |
</HTTPHeaders> | |
<RequestId>ecb727da-3cc7-4ea4-b7a3-869e90f869a7</RequestId> | |
<Arguments> | |
<Argument Name="Operation" Value="ItemSearch"/> | |
<Argument Name="Service" Value="AWSECommerceService"/> | |
<Argument Name="Signature" Value="bar/SKTWKZH1LQ97Rs2xNMwoYo="/> |