Open ssl.conf
in a text editor.
Edit the domain(s) listed under the [alt_names]
section so that they match the local domain name you want to use for your project, e.g.
DNS.1 = my-project.dev
Additional FQDNs can be added if required:
# This is just a cheat sheet: | |
# On production | |
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
# On local | |
scp -C production:~/database.sql.gz | |
dropdb database && createdb database | |
gunzip < database.sql.gz | psql database |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
Google Analytics | |
March 20, 2019 at 6:16pm (Edited 4 months ago) | |
I'm implementing Google Analytics to Reach Router running inside a React Static app (hence checking if the document exists). | |
This seems to be working, but if I console.log the pageview attributes, they get logged twice on each page visit. What's causing this? | |
// My Analytics component | |
import React from "react"; | |
import { Location } from "@reach/router"; | |
import ReactGA from "react-ga"; |
# most people include something like this. don't. | |
# check your default nginx.conf, it's already covered in a much better way. | |
#gzip_disable "MSIE [1-6]\.(?!.*SV1)"; | |
# compress proxied requests too. | |
# it doesn't actually matter if the request is proxied, we still want it compressed. | |
gzip_proxied any; | |
# a pretty comprehensive list of content mime types that we want to compress | |
# there's a lot of repetition here because different applications might use different |
// Place your settings in this file to overwrite the default settings | |
{ | |
"http.proxyStrictSSL": false, | |
"editor.tabSize": 2, | |
"files.exclude": { | |
".vscode": false, | |
"**/_build": true, | |
"**/.cache": true, | |
"**/.DS_Store": true, | |
"**/.git": true, |
https://gist.github.com/collegeimprovements/877930fefc0c87ac946751f9e517c14e |
let UserContext = React.createContext(); | |
class App extends React.Component { | |
state = { | |
user: null, | |
setUser: user => { | |
this.setState({ user }); | |
} | |
}; |
{ | |
"name": "gatsby-starter-default", | |
"private": true, | |
"description": "A simple starter to get up and developing quickly with Gatsby", | |
"version": "0.1.0", | |
"author": "Kyle Mathews <[email protected]>", | |
"dependencies": { | |
"date-fns": "^1.30.1", | |
"gatsby": "^2.1.34", | |
"gatsby-image": "^2.0.33", |
The biggest problem deploying compiled EmberJS apps as a container is the configuration defined during compile time and becomes part of the image. Which is not ideal as you probably want to move the image between QA/UAT and prod without any modification.
The solution I will describe here looks like a hack but it's been working for me.
<meta>
tag into index.html
: