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, | |
| }) | |
| ]; |
{
"Africa/Abidjan": 0,
"Africa/Accra": 0,
"Africa/Addis_Ababa": -180,
"Africa/Algiers": -60,
"Africa/Asmara": -180,
"Africa/Asmera": -180,
"Africa/Bamako": 0,
"Africa/Bangui": -60,$ 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>function createPromises(length) {
const promises = [];
for (let i = 0; i < length; i += 1) {
const value = Math.random();
promises.push(new Promise((resolve, reject) => setTimeout(() => {
if (value < 0.1) reject('exception');
resolve(value);
}, value * 1000)));
}function* iterate(length) {
for (let i = 1; i <= length; i += 1) yield i;
}
function* pow2(array) {
for (let i in array) yield array[i] ** 2;
}
const res = [...pow2([...iterate(10)])]; // (10) [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]function camel(object) {
const keys = Object.keys(object);
return keys.reduce((o, k) => {
if (k.includes('_')) {
const words = k.split('_');
const capitalized = words.map((word, i) => {
if (word.length > 0) {
const capital = i > 0 ? `${word[0].toUpperCase()}${word.substr(1)}` : word;
return capital; | [ | |
| {"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)"}, |