👨👩👦
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
# Add me in lib or somewhere | |
# lib/postmark_patch.rb | |
Mail::Message.class_eval do | |
def html? | |
content_type_without_symbol && content_type_without_symbol.include?('text/html') | |
end | |
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
NSArray *nibContents = [[NSBundle mainBundle] loadNibNamed:@"AddNewProductScrollView" owner:self options:nil]; | |
UIView *myView = [nibContents objectAtIndex:0]; | |
[scrollView addSubview: myView]; | |
[scrollView setContentSize:CGSizeMake(myView.frame.size.width, myView.frame.size.height)]; |
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
import java.util.Timer; | |
import java.util.TimerTask; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.util.DisplayMetrics; | |
import android.util.Log; | |
import android.widget.Toast; |
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 App < Padrino::Application | |
register Padrino::Rendering | |
register Padrino::Mailer | |
register Padrino::Helpers | |
layout :layout | |
configure :production do | |
puts "In production mode" | |
Stripe.api_key = Constants::STRIPE_LIVE_KEY |
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 ContactsActivity extends Activity { | |
List<Contact> contacts; | |
ContactsAdapter contactsAdapter; | |
ListView contactsList; | |
/** Called when the activity is first created. */ | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |
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 App < Padrino::Application | |
... | |
register WWWRedirect | |
... | |
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
// Creates the boundary for the multipart, the content type with the boundary, and the entity | |
String boundary = "---------------------------14737809831466499882746641449"; | |
String contentType = "multipart/form-data; boundary=" + boundary; | |
HttpEntity entity = new ProtocolMultipartEntity(boundary, new File("/some/path")); | |
// Creates the post request | |
HttpPost httpPostFileRequest = new HttpPost(route); | |
httpPostFileRequest.addHeader("Content-Type", contentType); | |
httpPostFileRequest.setEntity(entity); |
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
Sequel::Model.class_eval do | |
def map | |
return self.values | |
end | |
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
// | |
// UIImageView+Block.h | |
// | |
// Created by Josh Holtz on 5/17/12. | |
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIImageView (Block) |
OlderNewer