#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
require 'rubygems' | |
require 'bcrypt' | |
require 'haml' | |
require 'sinatra' | |
enable :sessions | |
userTable = {} | |
helpers do |
Get the Heroku db as detailed here: | |
http://devcenter.heroku.com/articles/pgbackups#exporting_via_a_backup | |
1. heroku pgbackups:capture | |
2. heroku pgbackups:url <backup_num> #=>backup_url | |
- get backup_num with cmd "heroku pgbackups" | |
3. curl -o latest.dump <backup_url> | |
Then locally do: | |
$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump |
#!/usr/bin/env python | |
#install the follow first: | |
#sudo easy_install pip | |
#sudo pip install -U boto | |
#sudo pip install configparser |
#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
#!/bin/bash | |
# -------------------------------------------------------------------------------------------- | |
# Installs Ruby using rbenv/ruby-build on the Raspberry Pi (Raspbian) | |
# | |
# Run from the web: | |
# bash <(curl -s https://gist.githubusercontent.com/blacktm/8302741/raw/install_ruby_rpi.sh) | |
# -------------------------------------------------------------------------------------------- | |
# Set the Ruby version you want to install |
(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.
# 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 |
import argparse | |
import json | |
import re | |
import os | |
from time import time | |
parser = argparse.ArgumentParser(description='Convert to Quiver Format') | |
parser.add_argument("src", help="The Source File You want to Convert") | |
args = parser.parse_args() | |
cells = [] |
# Based on: http://donpottinger.net/blog/2014/11/17/bye-bye-heroku-hello-dokku.html | |
# Add to gemfile: | |
ruby '2.1.2' | |
gem 'pg' | |
gem 'puma' | |
gem 'rails_12factor' | |
gem 'searchkick' | |
gem 'typhoeus' |
<%= f.input :email, | |
wrapper: :semantic_icon_input, | |
label: false, | |
required: true, | |
placeholder: t('users.form.placeholder.email'), | |
left_icon: 'user' %> |