Command: heroku pgbackups:capture --remote production
Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712
Command: heroku pgbackups:url [db_key] --remote production
// Functional setState (Recommended) | |
this.setState(prevState => { | |
const newState = { | |
...prevState.data, | |
transactions: [...data, prevState.data.transactions] | |
} | |
return { data: newState } | |
}) |
<? | |
// | |
// [ BUY BTC & ETH DAILY ON BITSTAMP ] | |
// by @levelsio | |
// | |
// 2017-08-23 | |
// | |
// 1) buy $40/day BTC | |
// 2) buy $10/day ETH | |
// |
const lookup = (namespace) => { | |
// if you really want rails-style indirection, you'd | |
// need an app container that could look up modules | |
// by strings. | |
} | |
const Resources = ({ namespace }) => { | |
const Layout = lookup(namespace, 'layout') | |
return ( | |
<Route path={`/${namespace}`} render={() => ( |
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
const axios = require('axios'); // promised based requests - like fetch() | |
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
}); | |
} |
buttonHTML = """<button type="button" class="attach" data-action="x-attach">Attach Files</button>""" | |
fileInputHTML = """<input type="file" multiple>""" | |
$(Trix.config.toolbar.content).find(".button_group.block_tools").append(buttonHTML) | |
$(document).on "trix-action-invoke", ($event) -> | |
if $event.originalEvent.actionName is "x-attach" | |
editorElement = $event.target | |
editorElement.focus() |
This is a post by Joel Spolsky, originally posted on answers.onstartups.com in response to a question. You can find a copy here.
This is such a common question here and elsewhere that I will attempt to write the world's most canonical answer to this question. Hopefully in the future when someone on answers.onstartups asks how to split up the ownership of their new company, you can simply point to this answer.
The most important principle: Fairness, and the perception of fairness, is much more valuable than owning a large stake. Almost everything that can go wrong in a startup will go wrong, and one of the biggest things that can go wrong is huge, angry, shouting matches between the founders as to who worked harder, who owns more, whose idea
This is the latest version of an email which I send periodically, offering customers the opportunity to pre-pay for SaaS in return for a discount. The benefits to the SaaS company are better cash flow and reduced churn rate. The benefits to the customer are, well, in the email. This genre of email has produced hundreds of thousands of dollars in pre-pays for some companies I work with, and it rarely requires any more work than this example.
I've put $79 is as a placeholder for the cost of the user's plan. We calculate that for each account, naturally, along with the billing contact's name.
Subject: Save $79 on Appointment Reminder (and get a tax write-off) Formatting: 100% plain text. Gmail automatically links up the central link. From: Patrick McKenzie (Appointment Reminder) patrick@appointmentreminder.org
require 'sneakers/runner' | |
task :environment | |
namespace :sneakers do | |
desc "Start processing jobs with all workers" | |
task :work => :environment do | |
silence_warnings do | |
Rails.application.eager_load! unless Rails.application.config.eager_load | |
end |