This document is an attempt to pin down all the things you don't think about when quoting for a project, and hopefully provide a starting point for some kind of framework to make quoting, working and delivering small-medium jobs more predictable and less stressful.
This file contains 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
I think this is a nice option for apps that are mostly used during particular hours and aren't really ready | |
for a more intense auto-scaling thing. Hirefire (https://github.com/meskyanichi/hirefire) likely does a | |
lot more, but I didn't really understand how it worked and don't really need something that fancy right now. | |
I suspect it requires at least one worker itself, but I don't really know. | |
Add an API key to your app's Heroku config | |
heroku config:add HEROKU_API_KEY=your_key (from https://api.heroku.com/account ) | |
Add the above rake task. Change 'YOUR-APPS-NAME' to indigo-butterfly-77 or whatever your app's name is. |
This file contains 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
require 'cloudsponge' | |
def cloudsponge_proxy | |
url = Cloudsponge::URL_BASE + 'auth?' + request.query_string | |
response = Cloudsponge::Utility::get_url(url) | |
if response.is_a?(Net::HTTPRedirection) | |
redirect_to response["location"] | |
else | |
render :text => response.try(:body) |
This file contains 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
// camel case variable names (no underscores) | |
// instance variables are nouns | |
var myArray = [1, 2, 3]; // space after commas | |
// title case for class names (class names should be nouns) | |
// space before bracket | |
function Widget() { | |
// two spaces for indentation | |
var parameterOne = 1; | |
var parameterTwo = 2; |