- When Gatsby starts up, it will read
gatsby-config.js
first. - As you can see below, we use that file to
require('ts-node').register()
which registers a TypeScript evaluator that will be used when Gatsby reads all other API Javascript files. In other words, we only need to do this once in our entire codebase and not in other Gatsby files likegatsby-node.js
. - Our
gatsby-config.js
re-exports all the exported variables available ingatsby-config.ts
.
function run(input, parameters) { | |
const appNames = []; | |
const skipAppNames = []; | |
const verbose = true; | |
const scriptName = "close_notifications_applescript"; | |
const CLEAR_ALL_ACTION = "Clear All"; | |
const CLEAR_ALL_ACTION_TOP = "Clear"; |
Granted, this is little more than an obfuscated way of having a publicly writable S3 bucket, but if you don’t have a server which can pre-sign URLs for you, this might be an acceptable solution.
For this to work, you take the following steps:
- Create a Lambda func, along with a new IAM role, keeping the default code.
- Create an API in the API Gateway.
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. Here's how to do it:
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
(or skip and force-add afterwards).
You can run your Express app very easily inside your Electron app.
All you need to do is to:
- place all the files of your Express app inside a new app folder in
your_electron_app\resources\app
- reconfigure the
app.js
file - refactor some relative pathes in your Express app
The standard names for indexes in PostgreSQL are:
{tablename}_{columnname(s)}_{suffix}
where the suffix is one of the following:
pkey
for a Primary Key constraint;key
for a Unique constraint;excl
for an Exclusion constraint;idx
for any other kind of index;
A git choose-your-own-adventure!
This document is an attempt to be a fairly comprehensive guide to recovering from what you did not mean to do when using git. It isn't that git is so complicated that you need a large document to take care or your particular problem, it is more that the set of things that you might have done is so large that different techniques are needed depending on exactly what you have done and what you want to have happen.