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
# -*- coding: utf-8 -*- | |
""" | |
pulley.util | |
~~~~~~~~~~~ | |
:copyright: (c) 2016 by Andrew Bednar. | |
""" | |
from flask.views import MethodView | |
from flask import request |
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 apistar import Include, Route | |
from apistar.frameworks.wsgi import WSGIApp as App | |
from apistar.http import QueryParams | |
from apistar_mail import mail_component, Mail, Message | |
from apistar_dramatiq import actor | |
settings = { | |
'MAIL': { | |
'MAIL_SERVER': 'smtp.example.com', | |
'MAIL_USERNAME': '[email protected]', |
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 datetime as dt | |
import decimal | |
import typing | |
from apistar import types | |
from apistar.http import JSONResponse, Response | |
from apistar.server.components import Component | |
from sqlalchemy.engine import Engine | |
from sqlalchemy.orm import sessionmaker, Session, scoped_session | |
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 io | |
import typing | |
from apistar import Component, http | |
from apistar.server.wsgi import WSGIEnviron | |
from werkzeug.datastructures import ImmutableMultiDict | |
from werkzeug.formparser import FormDataParser | |
from werkzeug.http import parse_options_header | |
from werkzeug.wsgi import get_input_stream | |
RequestStream = typing.NewType('RequestStream', io.BufferedIOBase) |
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
#include <QGuiApplication> | |
#include <QQmlApplicationEngine> | |
int main(int argc, char *argv[]) { | |
QGuiApplication app(argc, argv); | |
QQmlApplicationEngine engine; | |
engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); | |
return app.exec(); |
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
$orange: #f99e1a; //rgb(249,158,26) | |
$gray: #43484c; //rgb(67,72,76) | |
$navy-blue: #405275; //rgb(64,82,117) | |
$light-blue: #218ffe; //rgb(33,143,254) | |
$black: #000000; //rgb(0,0,0) |
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
defualt_stages: [commit, push] | |
fail_fast: true | |
repos: | |
- repo: https://github.com/ambv/black | |
rev: stable | |
hooks: | |
- id: black | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v2.1.0 | |
hooks: |
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
# The recommendation is to always use a 14 character password. No clue why so small. | |
# Strings are in base 64 so you can type them out on a standard keyboard | |
#### OpenSSL #### | |
openssl rand 14 -base64 | |
#### pwgen #### | |
# pwgen has a lot of options. check man pwgen. | |
# Creates a single password |
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
#!/usr/bin/env bash | |
# setting -e to exit immediately on a command failure. | |
# setting -o pipefail sets the exit code of a pipeline to that of the rightmost command to exit with a non-zero status, or to zero if all commands of the pipeline exit successfully. | |
set -eo pipefail | |
# Most likely you will only need to change the path variables per your project structure. | |
DEV_REQ_PATH=./ | |
REQ_PATH=./services/cms/ |
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
# Allow copy paste with "y" | |
bind P paste-buffer | |
bind-key -T copy-mode-vi v send-keys -X begin-selection | |
bind-key -T copy-mode-vi y send-keys -X copy-selection | |
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle | |
# Enable mouse mode (tmux 2.1 and above) | |
set -g mouse on | |
# reload config file (change file location to your the tmux.conf you want to use) | |
bind r source-file ~/.tmux.conf |
OlderNewer