Command: heroku pgbackups:capture --remote production
Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712
Command: heroku pgbackups:url [db_key] --remote production
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'aws-sdk' | |
| class S3FolderUpload | |
| attr_reader :folder_path, :total_files, :s3_bucket, :include_folder | |
| attr_accessor :files | |
| # Initialize the upload class |
| <?xml version="1.0" encoding="UTF-8" ?> | |
| <Package xmlns="http://soap.sforce.com/2006/04/metadata"> | |
| <types> | |
| <members>*</members> | |
| <name>ApexClass</name> | |
| </types> | |
| <types> | |
| <members>*</members> | |
| <name>ApexComponent</name> | |
| </types> |
| class ApplicationController < ActionControllerBase | |
| helper :do_something | |
| def do_something | |
| @from_do_something = params[:for_do_something] | |
| end | |
| end |
| # This is a skeleton for testing models including examples of validations, callbacks, | |
| # scopes, instance & class methods, associations, and more. | |
| # Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
| # | |
| # I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
| # so if you have any, please share! | |
| # | |
| # @kyletcarlson | |
| # | |
| # This skeleton also assumes you're using the following gems: |
Software required:
After installation and putting the youtube-dl in PATH
youtube-dl \
| // getComponent is a function that returns a promise for a component | |
| // It will not be called until the first mount | |
| function asyncComponent(getComponent) { | |
| return class AsyncComponent extends React.Component { | |
| static Component = null; | |
| state = { Component: AsyncComponent.Component }; | |
| componentWillMount() { | |
| if (!this.state.Component) { | |
| getComponent().then(Component => { |
| require 'action_dispatch/middleware/static' | |
| module Middleware | |
| class FileHandler < ActionDispatch::FileHandler | |
| def initialize(root, assets_path, cache_control) | |
| @assets_path = assets_path.chomp('/') + '/' | |
| super(root, cache_control) | |
| end | |
| def match?(path) |
| var fs = require("fs") | |
| var ssl_options = { | |
| key: fs.readFileSync('privatekey.pem'), | |
| cert: fs.readFileSync('certificate.pem') | |
| }; | |
| var port = process.env.PORT || 3000; | |
| var express = require('express'); | |
| var ejs = require('ejs'); | |
| var passport = require('passport') |
| app.post('/login', function(req, res) { | |
| console.log(res); | |
| passport.authenticate('local', function(err, user) { | |
| if (req.xhr) { | |
| //thanks @jkevinburton | |
| if (err) { return res.json({ error: err.message }); } | |
| if (!user) { return res.json({error : "Invalid Login"}); } | |
| req.login(user, {}, function(err) { | |
| if (err) { return res.json({error:err}); } | |
| return res.json( |