Skip to content

Instantly share code, notes, and snippets.

View BrandonDavidDee's full-sized avatar

Brandon David Demonbreun BrandonDavidDee

  • Fort Lauderdale, FL
View GitHub Profile
@BrandonDavidDee
BrandonDavidDee / Dockerfile
Created March 14, 2022 23:20
FastApi Python Docker file with pyodbc & ODBC Driver for SQL Server
# At time of writing the python parent image uses Debian 11
FROM tiangolo/uvicorn-gunicorn:python3.8-slim
COPY requirements.txt .
# Setup dependencies for pyodbc and weasyprint (cairo and pango libs)
RUN \
apt-get update && \
apt-get install -y curl build-essential unixodbc-dev g++ apt-transport-https libcairo2 libpango-1.0-0 libpangocairo-1.0-0 && \
# ADD THE KEY FROM MICROSOFT
@BrandonDavidDee
BrandonDavidDee / pdfView.vue
Last active November 14, 2019 15:13
Convert PDF Response to Blob for Viewing inline in a Vue component.
<template>
<div>
<div v-if="error">{{ error }}</div>
<iframe v-if="pdfUrl" :src="pdfUrl" class="pdf"></iframe>
</div>
</template>
<script>
const axios = require('axios');
@BrandonDavidDee
BrandonDavidDee / infinite_scroll.html
Last active September 11, 2018 19:19
Infinite Scroll with AngularJS
<!-- using Bootstrap 4 grid -->
<section ng-controller="myController">
<div class="container-fluid">
<div class="row">
<div class="col-sm-2" ng-repeat="i in images | limitTo:showThisMany">
<img ng-src="{{ i.thumbnail }}" class="img-fluid" />
</div>
</div>
@BrandonDavidDee
BrandonDavidDee / pause_all.html
Created July 31, 2018 17:19
Tiny Javascript script that pauses a playing html5 video once another video begins playing
<div class="row">
<div class="col-lg-4">
<div class="card">
<div class="card-body">
<video onplay="pauseAll(story1)" id='story1' controls>
<source src="story1.mp4" type="video/mp4">
</video>
</div><!-- card body -->
</div><!-- card -->
</div><!-- col -->
@BrandonDavidDee
BrandonDavidDee / authService.js
Created June 10, 2018 17:42
Set of AngularJS services used to set/get and refresh JSON tokens using cookies
// modified from: https://medium.com/@kevinle/exchange-refresh-token-for-json-web-token-jwt-in-angularjs-using-promise-453da9127cd7
'use strict';
angular.module('supportApp.services', [])
.factory('authService', ['$http', '$q', 'authCookies', 'parseToken',
function ($http, $q, authCookies, parseToken) {
return {