Open ~/.bash_profile
in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /your/root/path; | |
index index.html; | |
server_name you.server.com; |
{ | |
"al": { "full": "alabama", "other": ["ala"] }, | |
"ak": { "full": "alaska", "other": ["alas"] }, | |
"az": { "full": "arizona", "other": ["ariz"] }, | |
"ar": { "full": "arkansas", "other": ["ark"] }, | |
"ca": { "full": "california", "other": ["calif", "cal"] }, | |
"co": { "full": "colorado", "other": ["colo", "col"] }, | |
"ct": { "full": "connecticut", "other": ["conn"] }, | |
"de": { "full": "delaware", "other": ["del"] }, | |
"dc": { "full": "district of columbia", "other": ["washington dc", "wash dc"] }, |
module.exports = { | |
up: function (queryInterface, Sequelize) { | |
return [ | |
queryInterface.addColumn('User', 'name', { | |
type: Sequelize.STRING | |
}), | |
queryInterface.addColumn('User', 'nickname', { | |
type: Sequelize.STRING, | |
}) | |
]; |
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
[ | |
{"group":"US (Common)", | |
"zones":[ | |
{"value":"America/Puerto_Rico","name":"Puerto Rico (Atlantic)"}, | |
{"value":"America/New_York","name":"New York (Eastern)"}, | |
{"value":"America/Chicago","name":"Chicago (Central)"}, | |
{"value":"America/Denver","name":"Denver (Mountain)"}, | |
{"value":"America/Phoenix","name":"Phoenix (MST)"}, | |
{"value":"America/Los_Angeles","name":"Los Angeles (Pacific)"}, | |
{"value":"America/Anchorage","name":"Anchorage (Alaska)"}, |
In your command-line run the following commands:
brew doctor
brew update
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |