For Homebrew v2.6.x and below:
brew cask install ngrok
For Homebrew v2.7.x and above:
# Beanstalk ain't ready for Rails 6. This fix is courtesy of https://austingwalters.com/rails-6-on-elastic-beanstalk/ | |
# Additional node 6 cleanup courtesy of https://github.com/nodesource/distributions/issues/486 | |
commands: | |
00_remove_node_6_if_present: | |
command: "/bin/rm -rf /var/cache/yum && /usr/bin/yum remove -y nodejs && /bin/rm /etc/yum.repos.d/nodesource* && /usr/bin/yum clean all" | |
ignoreErrors: true | |
01_download_nodejs: | |
command: "curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -" | |
02_install_nodejs: |
// Insert into some kind of 'focus' action | |
var parent = $(this).parent().parent('.fieldWrap'); // Target a wrapper | |
// Reset active state | |
$('.fieldWrap').removeClass('active'); | |
// Add active state to current field | |
parent.addClass('active'); |
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
module Api | |
module V0 | |
class LinksController < ApplicationController | |
# THIS | |
before_action :set_headers | |
def show | |
@link = Link.find(params[:id]) | |
render json: @link | |
end |
# lib/tasks/db.rake | |
namespace :db do | |
desc "Dumps the database to db/APP_NAME.dump" | |
task :dump => :environment do | |
cmd = nil | |
with_config do |app, host, db, user| | |
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
end | |
puts cmd |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
class AuthMailer < Devise::Mailer | |
require 'rubygems' | |
require 'send_with_us' #after installing sendwithus_ruby gem, require the send_with_us.rb initializer file | |
helper :application # gives access to all helpers defined within `application_helper`. | |
include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_url` | |
default from: "[email protected]" | |
def confirmation_instructions(record, token, opts={}) |
<div id="main" role="main"> | |
<div class="container"> | |
<div class="row"> | |
<div class="span12" id="top-div"> <!--! added "top-div" id to help with ajax --> | |
<%= render 'layouts/messages' %> | |
<%= yield %> | |
</div> | |
</div> | |
<footer> | |
</footer> |