resources :zombies, only: [:index, :show]
resources :humans, except: [:destroy, :edit, :update]
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 'sinatra/base' | |
require 'rack/flash' | |
require 'warden' | |
require 'slim' | |
require 'sequel' | |
require 'sqlite3' | |
DB = Sequel.sqlite | |
DB.create_table :users do | |
primary_key :id |
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
<section id="home-container" class="parralex-scroll"> | |
<div class="wrapper"> | |
<div class="grid"> | |
<template id="people-listing-template"> | |
<div class="wrapper grid" id="start-parralex"> | |
<div class="grid__item large--one-third medium--one-whole no-padding product" v-for="product in products" v-cloak> | |
<router-link :to="{ name: 'product', params: { handle: product.handle }}"> | |
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
source 'https://rubygems.org' | |
# default gems here | |
#--------------------------- | |
# add paperclip and bootstrap | |
gem "paperclip", "~> 4.1" | |
gem 'bootstrap-sass', '~> 3.1.1' |
A quick overview of the node.js streams interface with basic examples.
This is based on @brycebaril's presentation, Node.js Streams2 Demystified
Streams are a first-class construct in Node.js for handling data.
Think of them as as lazy evaluation applied to data.
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 'mina/bundler' | |
require 'mina/rails' | |
require 'mina/git' | |
# require 'mina/rbenv' # for rbenv support. (http://rbenv.org) | |
require 'mina/rvm' # for rvm support. (http://rvm.io) | |
set :domain, '148.211.114.67' | |
set :user, 'user' | |
set :webroot, '/var/www' | |
set :app_name, 'your_rails_app' |
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
# Add devise to Gemfile | |
gem 'devise' | |
# Run bundle | |
bundle install | |
# Run devise install | |
rails generate devise:install | |
# Make sure alert code in application.html.erb |
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
# Login as root | |
ssh root@domain | |
# Create deploy user | |
adduser <username> #Adds User with username given. Enter Password when Prompted. Other Details are Optional | |
# Add user to sudo group | |
usermod -g <groupname> <username> | |
# Add .ssh/authorized_keys for deploy user |