Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Shengjia Yan yanshengjia

🏠
Working from home
Block or report user

Report or block yanshengjia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yanshengjia
yanshengjia / update_fork.md
Last active Apr 8, 2018 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date
View update_fork.md

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@yanshengjia
yanshengjia / mongo_backup.sh
Last active Apr 23, 2018 — forked from sheharyarn/mongo_backup.sh
Mongodump Shell Script for Cronjob
View mongo_backup.sh
#!/bin/bash
MONGO_DATABASE="annotation"
MONGO_HOST="127.0.0.1"
MONGO_PORT="27017"
TIMESTAMP=`date +%Y-%m-%d-%H-%M-%S`
MONGODUMP_PATH=/usr/bin/mongodump
BACKUPS_DIR=~/sjyan/data/mongodb-backup/
BACKUP_NAME=$TIMESTAMP
SCRIPT_DIR=~/sjyan/scripts/
@yanshengjia
yanshengjia / tornado_cookie_secret_generator.py
Created Mar 20, 2018 — forked from didip/tornado_cookie_secret_generator.py
Generates secure cookie secret for Tornado Web Framework
View tornado_cookie_secret_generator.py
You can’t perform that action at this time.