This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo 'Dropping squarefoot_development DB'; | |
dropdb 'squarefoot_development'; | |
echo 'Recreating squarefoot_development DB'; | |
psql -c 'create database squarefoot_development'; | |
psql squarefoot_development -c 'CREATE extension plpgsql'; | |
psql squarefoot_development -c 'CREATE extension postgis'; | |
psql squarefoot_development -c 'CREATE extension hstore'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time_namelookup: %{time_namelookup}\n | |
time_connect: %{time_connect}\n | |
time_appconnect: %{time_appconnect}\n | |
time_pretransfer: %{time_pretransfer}\n | |
time_redirect: %{time_redirect}\n | |
time_starttransfer: %{time_starttransfer}\n | |
----------\n | |
time_total: %{time_total}\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const crypto = require("crypto"); | |
function hash(data, callback) { | |
let counter = 0; | |
let result = []; | |
let func = () => { | |
if(counter === data.length) { | |
callback(result); | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | |
"editor.codeActionsOnSave": { | |
"source.fixAll.eslint": true, | |
"source.fixAll.stylelint": true | |
}, | |
"editor.formatOnSave": true, | |
"eslint.format.enable": true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const interestCalc = (init, rate, years) => { | |
const pot = [...Array(years).keys()].reduce((acc, c) => { | |
const earnings = acc * rate; | |
acc += earnings; | |
console.log(`Earnings: £${earnings.toFixed(2)}, New Total: £${acc.toFixed(2)}`); | |
return acc; | |
}, init); | |
console.log(`Total: £${pot.toFixed(2)}. Total Earned: £${(pot - init).toFixed(2)}`); | |
} |