Skip to content

Instantly share code, notes, and snippets.

View m1yag1's full-sized avatar
๐Ÿ˜†

Mike Arbelaez m1yag1

๐Ÿ˜†
View GitHub Profile
@m1yag1
m1yag1 / testrail_gh_import.py
Last active September 14, 2018 19:48
Import a csv export of TestRail test cases into GitHub as user stories
import csv
import os
from datetime import datetime
# Requires pip install github3.py
from github3 import login
# Requires pip install jinja2
from jinja2 import Template
@m1yag1
m1yag1 / tasks.json
Created October 9, 2017 20:07
Business model of a collection of tasks.
{
"DLM": 0,
"attachments-count": 0,
"boardColumn": {
"color": "#0AD2F5",
"id": 12044,
"name": "In Progess"
},
"canComplete": true,
"canEdit": true,
@m1yag1
m1yag1 / brew_install.sh
Last active January 3, 2025 06:04
Bash script for installing homebrew
#!/usr/bin/env bash
# This is part of a larger script for setting a mac for python development.
set -e
# Shared functions
pretty_print() {
printf "\n%b\n" "$1"
}
@m1yag1
m1yag1 / tmux.md
Created October 3, 2017 14:01 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@m1yag1
m1yag1 / one_flask_auth.py
Last active May 28, 2021 18:32
A one file example Flask application based on one_flask.py showcasing flask-security for authentication.
# THIS PROJECT IS AN EXAMPLE APP. SOME CODE MAY NOT BE ACTUALLY USEFUL
# FOR DEMONSTRATION PURPOSES ONLY
# YOUR MILEAGE MAY VARY
# Requirements are Flask, Flask-WTF, Flask-SQLAlchemy, bcrypt
import os
from flask import (Flask,
Blueprint,
redirect,
@m1yag1
m1yag1 / one_flask.py
Created August 26, 2017 15:43 — forked from mikefromit/one_flask.py
a one file flask app for trying stuff
# THIS PROJECT IS AN EXAMPLE APP. SOME CODE MAY NOT BE ACTUALLY USEFUL
# FOR DEMONSTRATION PURPOSES ONLY
# YOUR MILEAGE MAY VARY
# Requirements are Flask, Flask-WTF, Flask-SQLAlchemy
import os
from flask import (Flask,
Blueprint,
redirect,
@m1yag1
m1yag1 / one_file_flask.py
Created November 4, 2016 20:28
A one file flask application for trying things out.
# THIS PROJECT IS AN EXAMPLE APP. SOME CODE MAY NOT BE ACTUALLY USEFUL
# FOR DEMONSTRATION PURPOSES ONLY
# YOUR MILEAGE MAY VARY
import os
from flask import (Flask,
Blueprint,
redirect,
from sqlalchemy import create_engine, MetaData
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import sessionmaker
def create_sa_connection(connection):
engine = create_engine(connection, echo=False)
Session = sessionmaker(bind=engine)
return engine, session()
@m1yag1
m1yag1 / app.plist
Created November 18, 2015 19:15
launchd template
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.IDENTIFIER_HERE.SOMETHING</string>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<false/>
@m1yag1
m1yag1 / sqlalchemy_dupe_row
Last active August 29, 2015 14:25 — forked from kennyledet/sqlalchemy_dupe_row
SQLAlchemy Duplicate Row
def copy_row(model, row, ignored_columns=[]):
copy = model()
for col in row.__table__.columns:
if col.name not in ignored_columns:
try:
copy.__setattr__(col.name, getattr(row, col.name))
except Exception as e:
print e
continue