A Pen by mangangreg on CodePen.
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
# Usage `gpushu <username>` from inside of a repo, to push to git from user, will get prompted for password | |
function gpushu(){ | |
USERNAME=$1 | |
REPO=`git config --get remote.origin.url | awk -F 'com' '{print $2}' | cut -c 2-` | |
git push "https://$USERNAME@github.com/$REPO" | |
} |
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
import os | |
from pathlib import Path | |
from pymongo import MongoClient | |
from dotenv import load_dotenv | |
HERE = Path(__file__).parent | |
class MongoConnect: | |
def __init__(self, user=None, password=None, host=None, port=None, database=None, env_file=HERE/'.mongo.env'): | |
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
javascript:(function(){ var style = document.createElement("style");document.head.appendChild(style);style.sheet.insertRule("#site .container {flex-grow:1;margin:15px;}");style.sheet.insertRule("#notebook, #texteditor-backdrop {display:flex;}");})(); |