Some JavaScript
// Delete confirmation modals
$('#delete-confirm').on('show', function() {
var $submit = $(this).find('.btn-danger'),
href = $submit.attr('href');
$submit.attr('href', href.replace('pony', $(this).data('id')));
# a.rb | |
class A < ActiveRecord::Base | |
has_one :b | |
accepts_nested_attributes_for :b | |
end | |
# b.rb | |
class B < ActiveRecord::Base | |
belongs_to :a | |
attr_accessible :name |
# Enable GZIP | |
use Rack::Deflater |
require 'open-uri' | |
url = 'http://maps.googleapis.com/maps/api/staticmap?center=40.714728,-73.998672&markers=color:0x4E3253%7C40.714728,-73.998672&zoom=15&size=640x640&scale=2&format=png&maptype=roadmap&sensor=false' | |
target = File.join(File.expand_path('../', __FILE__), '/maps.jpg') | |
File.open(target, "wb") do |saved_file| | |
open(url, 'rb') do |read_file| | |
saved_file.write(read_file.read) | |
end | |
end |
lala | |
begin | |
sddasdas | |
asdasdasd | |
asdasd | |
end | |
lolo |
A list of items that contain a thumbnail image and a large block of text. Small screens hide the summary content but gets exposed once screen space becomes available.
Considerations Normally it's not a good idea to hide content for small screens, so make sure the content being hidden (article excerpt, further product info, etc) is supplementary and not essential for the user to make an informed decision. Make sure that hidden content is still accessible somewhere (it would most likely live on the linked page). Read: The media object saves hundreds of lines of code
A Pen by Brad Frost on CodePen.
require 'azure_blob_service' | |
namespace :azure do | |
desc 'Uploads application assets to Azure' | |
task upload_assets: :environment do | |
service = AzureBlobService.new( | |
Rails.application.secrets.azure['account_name'], | |
Rails.application.secrets.azure['access_key']) | |
service.ensure_container_exists('assets') |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"vmSku": { | |
"type": "string", | |
"defaultValue": "Standard_F1s", | |
"metadata": { | |
"description": "Size of VMs in the VM Scale Set." | |
} |