Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.
These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.
Create a Dokku app:
| "use client"; | |
| /* eslint-disable @next/next/no-img-element */ | |
| import Link from "next/link"; | |
| import { useState, useEffect } from 'react'; | |
| import { | |
| AppBskyFeedDefs, | |
| AppBskyFeedPost, | |
| type AppBskyFeedGetPostThread, | |
| } from "@atproto/api"; |
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.
These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.
Create a Dokku app:
My notes for Dokku on Digital Ocean.
These may be a bit outdated: Since I originally wrote them, I've reinstalled on a newer Dokku and may not have updated every section below.
Install dokku-cli (gem install dokku-cli) for a more Heroku-like CLI experience (dokku config:set FOO=bar).
# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)
ssh henroku dokku
| #! /bin/bash | |
| # directory to save backups in, must be rwx by postgres user | |
| BASE_DIR="/var/backups/postgres" | |
| YMD=$(date "+%Y-%m-%d") | |
| DIR="$BASE_DIR/$YMD" | |
| mkdir -p $DIR | |
| cd $DIR | |
| # make database backup |
| # Upload gems | |
| gem "carrierwave" | |
| gem "mini_magick", "~> 3.3" | |
| gem "fog", "~> 1.3.1" |
| // 1. Go to page https://www.linkedin.com/settings/email-frequency | |
| // 2. You may need to login | |
| // 3. Open JS console | |
| // ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers)) | |
| // 4. Copy the following code in and execute | |
| // 5. No more emails | |
| // | |
| // Bookmarklet version: | |
| // http://chengyin.github.io/linkedin-unsubscribed/ |
| { | |
| "app/models/*.rb": { | |
| "command": "model", | |
| "affinity": "model", | |
| "alternate": ["unit/models/%s_spec.rb", "spec/models/%s_spec.rb"], | |
| "related": "db/schema.rb#%p", | |
| "template": "class %S\nend" | |
| }, | |
| "spec/factories/*_factory.rb": { |
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| @user.errors[:email].should include("is invalid") # check for the error format message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |