Skip to content

Instantly share code, notes, and snippets.

@bobquest33
bobquest33 / dispatch.py
Created July 18, 2017 17:59 — forked from aortbals/dispatch.py
Synchronize two folders using python.
#! /usr/bin/python
# Dispatch - synchronize two folders
import os
import filecmp
import shutil
from stat import *
class Dispatch:
''' This class represents a synchronization object '''
@bobquest33
bobquest33 / feedfinder.py
Created July 18, 2017 07:13 — forked from Querela/feedfinder.py
[python][html][feed][rss] feed finder from url
#!/usr/local/bin/python3
#
# feedfinder.py
#
# Utils for finding feeds
#
import sys
from datetime import datetime
@bobquest33
bobquest33 / pyget2.py
Created June 22, 2017 11:13 — forked from benhutchins/pyget2.py
A python download accelerator
#!/usr/bin/env python
#
# pyget2.py
# A python download accelerator
#
# This file uses multiprocessing along with
# chunked/parallel downloading to speed up
# the download of files (if possible).
#
# @author Benjamin Hutchins
@bobquest33
bobquest33 / gmail_imap_dump_eml.py
Created June 6, 2017 06:54 — forked from robulouski/gmail_imap_dump_eml.py
Very simple Python script to dump all emails in an IMAP folder to files.
#!/usr/bin/env python
#
# Very simple Python script to dump all emails in an IMAP folder to files.
# This code is released into the public domain.
#
# RKI Nov 2013
#
import sys
import imaplib
import getpass
@bobquest33
bobquest33 / chat.py
Created May 18, 2017 14:34 — forked from gregvish/chat.py
Python 3.4 asyncio chat server example
from socket import socket, SO_REUSEADDR, SOL_SOCKET
from asyncio import Task, coroutine, get_event_loop
class Peer(object):
def __init__(self, server, sock, name):
self.loop = server.loop
self.name = name
self._sock = sock
self._server = server
Task(self._peer_handler())
@bobquest33
bobquest33 / extract_emails_from_text.py
Created March 23, 2017 10:07 — forked from dideler/example.md
A python script for extracting email addresses from text files. You can pass it multiple files. It prints the email addresses to stdout, one address per line. For ease of use, remove the .py extension and place it in your $PATH (e.g. /usr/local/bin/) to run it like a built-in command.
#!/usr/bin/env python
#
# Extracts email addresses from one or more plain text files.
#
# Notes:
# - Does not save to file (pipe the output to a file if you want it saved).
# - Does not check for duplicates (which can easily be done in the terminal).
#
# (c) 2013 Dennis Ideler <[email protected]>
@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 / 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 / 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 / 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)