Skip to content

Instantly share code, notes, and snippets.

Greg Elin gregelin

Block or report user

Report or block gregelin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gregelin / pyodide.html
Created Dec 15, 2019
Example pyodide.html
View pyodide.html
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<script type="text/javascript" src="pyodide.js"></script>
<h1>My Pyodide Page</h2>
gregelin /
Created Jun 25, 2019
Remove BOM characters using vim (e.g., \ufeff)

You can easily remove them using vim, here are the steps:

  1. In your terminal, open the file using vim:

vim file_name

  1. Remove all BOM characters:

:set nobomb

gregelin /
Last active Apr 29, 2019
Testing GovReady-Q

This gist contains information on code scanning soon to be added to


Running Tests

GovReady-Q's unit tests and integration tests are currently combined. Our integration tests uses Selenium to simulate user interactions with the interface.

To run the integration tests, you'll also need to install chromedriver:

gregelin /
Created Dec 3, 2017
Generating ERD for django projects
# Install django-extensions
pip3 install django-extensions

# Add django-extensions INSTALLED_APPS in siteapp >
#    ...
#    'django_extensions',
# )
gregelin /
Last active Sep 29, 2017
Developing Compliance Apps


Step-by-step guide to creating compliance apps using docker version of GovReady-Q Commpliance Server.

Create Directories for Development

We need a place to download GovReady's install script, a place for GovReady's local sqlite database, and finally a place to store our apps for local development.

These places can be any directory path. For simplicity, let's create a single directory to store the install script and sqlite database and a subdirectory for local compliance app development.

gregelin /
Created Aug 10, 2017
Reclaiming space on Time Machine / Time Capsule

Relcaiming space on Time Machine / Time Capsule

See: Apple Forum Answer

  1. Connect briefly to Time Machine to get drive mounted
  2. Delete backups; make sure Time Machine is not running a backup
  3. Open terminal
  4. Compact sparsebundle to reclaim space
View myfile.html
<h1>Welcome To MySite</h1>
<p>This is a worked example of patching source code.</p>
gregelin /
Created Jun 7, 2017 — forked from dergachev/
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF


To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

gregelin /
Last active Jun 5, 2017
Draft blog post on Managing Compliance Snippets with OpenControl and ComplianceLib

Managing Compliance Snippets with OpenControl and ComplianceLib


This post explains how I am using OpenControl and ComplianceLib, a couple of tools from the emerging discipline of supply chain compliance documentation automation, to manage re-usable compliance documentation content applicable to multiple systems at multiple government agencies.

The post shares how the real world example of mapping the 800-53 controls to Drupal projects (e.g., plugins) was solved by documenting the controls once in a publicly available repository using the OpenControl data format and then programmatically generating customized documents private system documentation using the open source ComplianceLib software library and a bit of Python`.

Re-usable compliance content is a blessing

Re-usable, iteratively written compliance content would be a blessing. I write iteratively. I make typographical errors. Others suggest revisions. Documenting and maintaining mappings betweem system components and compliance control

# check banned ip address
iptables -L

# check banned ip addresses and rules
iptables -L -n

# check for specific ip address on ban list
iptables -L -n | grep IPADDRESSHERE
You can’t perform that action at this time.