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.
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> |
--color-scale-white: #ffffff; | |
--color-scale-gray-0: #f6f8fa; | |
--color-scale-gray-1: #eaeef2; | |
--color-scale-gray-2: #d0d7de; | |
--color-scale-gray-3: #afb8c1; | |
--color-scale-gray-4: #8c959f; | |
--color-scale-gray-5: #6e7781; | |
--color-scale-gray-6: #57606a; | |
--color-scale-gray-7: #424a53; | |
--color-scale-gray-8: #32383f; |
/* CHALLENGE 1 */ | |
function sayHowdy() { | |
console.log('Howdy'); | |
} | |
function testMe() { | |
setTimeout(sayHowdy, 0); | |
console.log('Partnah'); | |
} |
.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; | |
} |
/* ==UserStyle== | |
@name Dark Docs | |
@version 2022.12.17 | |
@namespace userstyles.world/user/winghongchan | |
@description A dark theme for Google Docs web, based on the colors used in its mobile app. | |
@author winghongchan | |
@license No License | |
@preprocessor less | |
@var select document-filter "Document filter" {"none:None": "none", "dim:Dim": "contrast(80%) brightness(90%)", "invert:Invert*": "var(--darkfilter)"} | |
@var number document-contrast "Document contrast while inverted" [80, 40, 100, 1, "%"] |
// Example 1 | |
// Write a function that returns the factorial of a number. | |
// EXAMPLE4! = 4 * 3 * 2 * 1 = 24, so calling factorial(4) should return 24. | |
// Initial example as I did not expect the function to use an argument as storage | |
// function factorial(num) { | |
// if (num == 1) return num; | |
// return num * factorial(num - 1); | |
// }; |
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.