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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/mpleasant/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
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
### Keybase proof | |
I hereby claim: | |
* I am hacym on github. | |
* I am mycahpleasant (https://keybase.io/mycahpleasant) on keybase. | |
* I have a public key ASB2xcFIK2LiMDPXtm3KrcHeRrQ0_gw-wOLrION7yZaMawo | |
To claim this, I am signing this object: |
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
[ | |
{ | |
"id": "abusaidm.html-snippets", | |
"name": "html-snippets", | |
"publisher": "abusaidm", | |
"version": "0.2.1" | |
}, | |
{ | |
"id": "aeschli.vscode-css-formatter", | |
"name": "vscode-css-formatter", |
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
from app import app | |
from flask import render_template, request, send_file, url_for | |
from PIL import Image, ImageDraw, ImageFont | |
import glob, os | |
# Index | |
@app.route("/", methods=['GET', 'POST']) | |
def index(): | |
if request.method == 'POST': | |
# Create our variables from our form |
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
from werkzeug.security import generate_password_hash, check_password_hash | |
from sql import UsersTable, session | |
from sqlalchemy import func | |
class NewUser(object): | |
'''Our user class, which holds all of the methods that will deal with | |
account related (not character) things ''' | |
def __init__(self, username, password): | |
# Initialize our variables | |
self.username = username |
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
def check_login(self): | |
userSearch = session.query(UsersTable).filter_by(username=self.username).count() | |
if userSearch >= 1: | |
password_check = self.check_password(self.stored_password, self.password) | |
if password_check is True: | |
login = 1 | |
return login | |
else: | |
login = 0 |