Skip to content

Instantly share code, notes, and snippets.

Avatar
👀
building and learning

Michael michaelcoyote

👀
building and learning
  • The Bay Area, NorCal, Earth
View GitHub Profile
@michaelcoyote
michaelcoyote / backup.py
Last active Dec 20, 2017
errbot backup
View backup.py
## This file is not executable on its own. use errbot -r FILE to restore your bot.
log.info("Restoring repo_manager.")
bot.repo_manager["installed_repos"] = {'sijis/err-vmware': 'https://github.com/sijis/err-vmware.git', 'errbotio/err-fileshare': 'https://github.com/errbotio/err-fileshare', 'AbigailBuccaneer/err-dailymarx': 'https://github.com/AbigailBuccaneer/err-dailymarx', 'jvasallo/err-plugins': 'https://github.com/jvasallo/err-plugins', 'carriercomm/err-hubot': 'https://github.com/carriercomm/err-hubot', 'keithslater/err-whois': 'https://github.com/keithslater/err-whois', 'jwm/err-gcalendar': 'https://github.com/jwm/err-gcalendar', 'errbotio/err-helloworld': 'https://github.com/errbotio/err-helloworld'}
bot.repo_manager["repo_index"] = {'errbotio/err-killme': {'KillMe': {'repo': 'https://github.com/errbotio/err-killme', 'documentation': 'Kill your bot.', 'python': '2+', 'path': '/killme.plug', 'avatar_url': 'https://avatars.githubusercontent.com/u/15802630?v=3', 'name': 'KillMe'}}, 'errbotio/err-storage
View tc_outbound_https.sh
#!/usr/bin/env bash
#
# Script to rate limit port 443
#
#network interface on which to limit traffic
IF="bond0"
#limit of the network interface in question
LINKCEIL="10gbit"
#limit outbound https protocol traffic to this rate
View sorted with and without key function.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@michaelcoyote
michaelcoyote / python_dict_defaults.ipynb
Last active Jun 19, 2017
Python dictonary defaults
View python_dict_defaults.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@michaelcoyote
michaelcoyote / classtest.py
Last active Jun 17, 2017
Comparison of plain, static and class methods
View classtest.py
#!/usr/bin/env python
"""Comparison of plain, static and class methods.
some tests around staticmethod and classmethod decorators along with methods
for programmatically loading external data using a dict defined in a static
method as a map between the external and internal data.
Also shown is the property decorator, however setters and deleters are
not shown.
@michaelcoyote
michaelcoyote / crypt_drive_notes.md
Last active Jun 15, 2017
Linux encrypted LVM and luks notes.
View crypt_drive_notes.md
@michaelcoyote
michaelcoyote / tc_rate_limit.sh
Last active Jun 15, 2017
Script to rate limit port 443
View tc_rate_limit.sh
#!/usr/bin/env bash
#
# Script to rate limit port 443
#
#network interface on which to limit traffic
IF="bond0"
#limit of the network interface in question
LINKCEIL="10gbit"
#limit outbound https protocol traffic to this rate
View Italian_foodwords.txt
Abbacchio - lamb
Acciughe – anchovies
Aceto - vinegar
Affumicato - smoked
Aglio - garlic
Aglio e olio - garlic and oil
Agnello - lamb
Agrodolce - sweet/sour
Al dente - firm (literally to the tooth)
Amaretti - crisp cookies made with bitter almonds
View boshhelp.txt
→ bosh --help
BOSH CLI helps you manage your BOSH deployments and releases.
Usage: bosh [<options>] <command> [<args>]
-c, --config FILE Override configuration file. Also can be overridden by BOSH_CONFIG environment variable. Defaults to $HOME/.bosh_config. Override precedence is command-line option, then environment variable, then home directory.
--[no-]color Toggle colorized output
-v, --verbose Show additional output
-q, --quiet Suppress all output
-n, --non-interactive Don't ask for user input
-N, --no-track Return Task ID and don't track
@michaelcoyote
michaelcoyote / pf.conf
Last active Jun 15, 2017
An old OpenBSD pf.conf circa 3.1.
View pf.conf
# Basic openbsd pf.conf file circa 3.1. (would need updating to use)
#
# Required order: options, normalization, queueing, translation, filtering.
# Macros and tables may be defined and used anywhere.
# Note that translation rules are first match while filter rules are last match.
# Macros: define common values, so they can be referenced and changed easily.
ext_if="xl0" # replace with actual external interface name i.e., dc0
external_addr="52.218.113.29"
# Internal network info if needed