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
validVideoFileExtensions = [ ".mp4", ".m4v", ".mov" ] | |
validAudioFileExtensions = [ ".mp3", ".m4a" ] | |
$("input#sermon_video").live "change", -> | |
if this.type is "file" | |
sFileName = this.value | |
if sFileName.length > 0 | |
blnValid = false | |
j = 0 |
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
before_filter :secure_subdomain_ssl | |
private | |
def secure_subdomain_ssl | |
if Rails.env.production? | |
if request.subdomain != 'secure' or request.ssl? != true | |
redirect_to :subdomain => 'secure', :protocol => 'https' | |
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
before_filter :no_secure_subdomain_ssl | |
def no_secure_subdomain_ssl | |
if request.subdomain == 'secure' or request.ssl? == true | |
redirect_to root_url(:host => request.domain, :protocol => 'http' ) | |
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
> Grab the files from Apple's Page | |
>> https://developer.apple.com/library/ios/#samplecode/Reachability/Listings/Classes_Reachability_h.html#//apple_ref/doc/uid/DTS40007324-Classes_Reachability_h-DontLinkElementID_5 | |
> Place them in your project (copy in, and ideally place them in your classes group) | |
> Click on the Reachability.m file and then on the upper right area click on the 'show file inspector' icon. | |
> Then make sure the target membership is for your project. | |
> Lastly, turn off arc for this file by doing: | |
>> Select desired files at Target/Build Phases/Compile Sources |
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
try{ | |
if (isOnline()){ | |
// Activity Stuff Goes Here | |
} else { | |
Log.d("Connection Status", "Connection Not Available"); | |
AlertDialog alertDialog = new AlertDialog.Builder(this).create(); | |
alertDialog.setTitle("No Network Connection"); | |
alertDialog.setMessage("Internet access is necessary for the use of this app."); | |
alertDialog.setButton("OK", new DialogInterface.OnClickListener() { |
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
rake db:schema:dump | |
rake db:schema:load |
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
production.rb: STRIPE_SECREY_KEY = "XXXX" | |
development.rb: STRIPE_SECREY_KEY = "YYYY" | |
initializers/stripe.rb: Stripe.api_key = STRIPE_SECRET_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
$(function() { | |
var subscription; | |
$(function() { | |
Stripe.setPublishableKey($('meta[name="stripe-key"]').attr('content')); | |
return subscription.setupForm(); | |
}); | |
subscription = { | |
setupForm: function() { | |
return $('#new_subscription').submit(function() { | |
$('input[type=submit]').attr('disabled', true); |
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
vboxmanage showvminfo <vmname> | |
vboxmanage modifyvm <vmname> --nic1 bridged --bridgeadapter1 <interface> | |
bam | |
vboxmanage startvm <vmname> --type headless | |
or | |
vboxheadless --startvm <vmname> *for rdp interface |
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
$('form').bind('submit', function(){ | |
return false; | |
}); |
OlderNewer