npm init -y
Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.
rails new ror-app-name --api
This step is for creating a very basic level of model for us to work in. If you know already, or wish to apply your own custom models with relationships you can skip this step.
Most configuration really isn't about the app -- it's about where the app runs, what keys it needs to communicate with third party API's, the db password and username, etc... They're just deployment details -- and there are lots of tools to help manage environment variables -- not the least handy being a simple .env file with all your settings. Simply source the appropriate env before you launch the app in the given env (you could make it part of a launch script, for instance).
env files look like this:
SOMEVAR="somevalue"
ANOTHERVAR="anothervalue"
To source it:
$ source dev.env # or staging.env, or production.env, depending on where you're deploying to
Picking the right architecture = Picking the right battles + Managing trade-offs
<link href='https://fonts.googleapis.com/css?family=Play:400,700' rel='stylesheet' type='text/css'> | |
<canvas id="game-canvas" width="640" height="640"></canvas> |
.gist { | |
.gist-file { | |
border: none !important; | |
margin-bottom: 0 !important; | |
.gist-data { | |
border-bottom: 2px solid #7f8c8d !important; | |
.line-numbers { | |
border-right: 2px solid #7f8c8d !important; | |
padding: 1em !important; | |
} |
Our app was already deployed and working on Heroku with MiniMagick. There were a few features of Image Processing that were appealing, performance and autorotation, and it appeared to be a straightforward swap.
Locally, we had run brew install vips
on our MacBooks to get it running. That was early in the process and a detail long forgotten. When I deployed to Heroku @juliancheal pointed out that the staging environment was failing with an ActiveSupport::MessageVerifier::InvalidSignature
error.
We were able to quickly identify the missing libvips
dependency.
Figuring out how to install libvips
to support rubyvips
to support Image Processing was not trivial and therefore this guidepost exists.
// The following data should be run in the console while viewing the page https://read.amazon.com/ | |
// It will export a CSV file called "download" which can (and should) be renamed with a .csv extension | |
var db = openDatabase('K4W', '3', 'thedatabase', 1024 * 1024); | |
getAmazonCsv = function() { | |
// Set header for CSV export line - change this if you change the fields used | |
var csvData = "ASIN,Title,Authors,PurchaseDate\n"; | |
db.transaction(function(tx) { |