Skip to content

Instantly share code, notes, and snippets.

@bobquest33
bobquest33 / Material Design Header Panel.markdown
Created December 25, 2015 03:44
Material Design Header Panel

Material Design Header Panel

An example of a fixed header with dynamic height and font height based on scroll position as shown in Material Design Specs. Using Skrollr

A Pen by Ben Strahan on CodePen.

License.

from flask import current_app, g, Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.httpauth import HTTPBasicAuth
from passlib.apps import custom_app_context as pwd_context
from itsdangerous import (TimedJSONWebSignatureSerializer
as Serializer, BadSignature, SignatureExpired)
app = Flask(__name__)
db = SQLAlchemy(app)
auth = HTTPBasicAuth()
#!/bin/sh
### BEGIN INIT INFO
# Provides: rtunnel
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: This service helps to access a local port from a remote server & port
# Description: This service helps to access a remote port from a remote server & port
@bobquest33
bobquest33 / aws_usage.py
Created January 5, 2017 14:05 — forked from harperreed/aws_usage.py
A script to query the Amazon Web Services (S3/EC2/etc) usage reports programmatically.
#!/usr/bin/env python
"""
A script to query the Amazon Web Services usage reports programmatically.
Ideally this wouldn't exist, and Amazon would provide an API we can use
instead, but hey - that's life.
Basically takes your AWS account username and password, logs into the
website as you, and grabs the data out. Always gets the 'All Usage Types'
@bobquest33
bobquest33 / Hosting Contingency.md
Created January 14, 2017 12:59
Hosting Contingency

Hosting Contingency

Provider independency

To ensure this contingency plan is possible, it is important to consider vendor and platform specific concepts and tooling. A range of providers use similar concepts and tools to abstract the platform/vendor specific APIs and provide a unified API to provision services, examples of these tools are listed below.

Example providers include

  • Amazon Web Services (AWS)
  • Google Cloud Platform (GCP)
  • Microsoft Azure (Azure)
@bobquest33
bobquest33 / metainfo.py
Created January 14, 2017 19:06 — forked from andreasvc/metainfo.py
Extract metadata from Project Gutenberg RDF catalog into a Python dict.
"""Extract metadata from Project Gutenberg RDF catalog into a Python dict.
Based on https://bitbucket.org/c-w/gutenberg/
>>> md = readmetadata()
>>> md[123]
{'LCC': {'PS'},
'author': u'Burroughs, Edgar Rice',
'authoryearofbirth': 1875,
'authoryearofdeath': 1950,
@bobquest33
bobquest33 / 1.js
Created January 23, 2017 19:26 — forked from ToeJamson/1.js
HTML5 Mass Broadcasting Desktop Notifications
<div
channel-name=notifications-channel
segregate-notifications-by-page=false
id=desktop-notifications-config
></div>
<div id=pubnub pub-key=demo sub-key=demo></div>
<script src=http://http://cdn.pubnub.com/pubnub-3.5.4.min.js></script>
<script
src=http://www.pubnub.com/static/html5-desktop-notification-broadcasting.js
></script>
@bobquest33
bobquest33 / jupyter
Last active February 4, 2017 05:31 — forked from jmtatsch/jupyter
A service (init.d) script for jupyter
#! /bin/sh
### BEGIN INIT INFO
# Provides: jupyter
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start jupyter
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@bobquest33
bobquest33 / cid_ifc
Created March 17, 2017 08:24
Cutplace Example
Interface: IFC
Data format
D Format CSV
D Header 1
Fields
F bank
Interface: IFC
Data format
D Format CSV
D Header 1
Fields
F bank