Think different(ly)
Get out of your rut and learn new ways to think.
#!/usr/bin/env ruby | |
url = ARGV.pop | |
if url.to_s.strip.length == 0 | |
puts "Error: Please supply a URL" | |
exit 1 | |
end | |
uncompressed_bytes = `curl "#{url}" --silent --write-out "%{size_download}\n" --output /dev/null` |
if defined?(RSpec) | |
namespace :rcov do | |
RSpec::Core::RakeTask.new(:rspec_aggregate) do |task| | |
task.pattern = 'spec/**/*_spec.rb' | |
task.rspec_opts = "--format progress" | |
task.rcov = true | |
task.rcov_opts = "--rails --exclude osx\/objc,spec,gems\/ " + | |
"--aggregate tmp/coverage.data" | |
end |
# How to render rails 3.0 views within rake tasks. | |
# | |
# Description: An example of how to render a view within a rake task, | |
# complete with instance variables, application & url helpers and I18n. | |
# | |
# License: X11 license | |
# | |
# Copyright (c) 2010 Kim Burgestrand <http://burgestrand.se/> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
#!/bin/sh | |
#################################### | |
# Output file for HTML5 video # | |
# Requirements: # | |
# - handbrakecli # | |
# - ffmpeg # | |
# - ffmpeg2theora # | |
# # | |
# usage: # |
--- | |
- hosts: all | |
user: root | |
sudo: true | |
tasks: | |
- name: update apt | |
command: apt-get update | |
- name: update bash |
$('#products').append('<%= j render(@products) %>'); | |
<% if @products.next_page %> | |
$('.pagination').replaceWith('<%= j will_paginate(@products) %>'); | |
<% else %> | |
$('.pagination').remove(); | |
<% end %> |
INTRO | |
I get asked regularly for good resources on AWS security. This gist collects some of these resources (docs, blogs, talks, open source tools, etc.). Feel free to suggest and contribute. | |
Short Link: http://tiny.cc/awssecurity | |
Official AWS Security Resources | |
* Security Blog - http://blogs.aws.amazon.com/security/ | |
* Security Advisories - http://aws.amazon.com/security/security-bulletins/ | |
* Security Whitepaper (AWS Security Processes/Practices) - http://media.amazonwebservices.com/pdf/AWS_Security_Whitepaper.pdf | |
* Security Best Practices Whitepaper - http://media.amazonwebservices.com/AWS_Security_Best_Practices.pdf |
Here's what I did to get things working.
Yep, over at: https://developer.apple.com
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
end |