This file contains hidden or 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
{ | |
"Print to console": { | |
"prefix": "clog", | |
"body": ["console.log('$1');", "$2"], | |
"description": "Log output to console" | |
}, | |
"Add proptypes import": { | |
"prefix": "iproptypes", | |
"body": ["import PropTypes from 'prop-types'"], | |
"description": "Add proptypes import" |
This file contains hidden or 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
set -eu | |
set -o pipefail | |
#!/bin/sh | |
export AWS_ACCESS_KEY_ID=$BACKUP_S3_KEY | |
export AWS_SECRET_ACCESS_KEY=$BACKUP_S3_SECRET | |
mongodump --uri ${BACKUP_URI} -o "/tmp/dump" | |
tar czf "/tmp/dump.tar.gz" "/tmp/dump" |
This file contains hidden or 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
import chalk from 'chalk' | |
import dotenv from 'dotenv' | |
import mongoose from 'mongoose' | |
import Book from '../../models/book' | |
import Verse from '../../models/verse' | |
import nvi from './data/nvi' | |
dotenv.config() |
This file contains hidden or 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
import chalk from 'chalk' | |
import dotenv from 'dotenv' | |
import mongoose from 'mongoose' | |
import Book from '../../models/book' | |
import books from './data/books' | |
dotenv.config() | |
mongoose.set('useCreateIndex', true) |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
This file contains hidden or 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
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "cmd+d", | |
"command": "-editor.action.addSelectionToNextFindMatch", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "cmd+d", | |
"command": "editor.action.deleteLines", |
This file contains hidden or 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.fontFamily": "Fira Code", | |
"editor.fontLigatures": true, | |
"editor.fontSize": 16, | |
"editor.formatOnSave": true, | |
"editor.minimap.enabled": false, | |
"editor.tabSize": 2, | |
"eslint.autoFixOnSave": true, | |
"javascript.validate.enable": false, | |
"explorer.confirmDragAndDrop": false, |
This file contains hidden or 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
curl -H "Authorization: token [[TOKEN]]" 'https://$GITHUB_AT:@api.github.com/orgs/[[ORGANIZATION]]/repos?page=[[PAGE]]&per_page=[[PAGE_SIZE]]' | jq .[].ssh_url | xargs -n 1 git clone |
This file contains hidden or 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
# exec: ./restore-mongodb.sh /path | |
mongorestore --db DATABASE_LOCAL --verbose $1 |
This file contains hidden or 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
mongodump -h SERVER:PORT -d DATABASE -u USER -p PASSWORD -o $PWD"/bkp-$(date +'%Y-%m-%d-%H-%M-%S')" |
NewerOlder