Skip to content

Instantly share code, notes, and snippets.

View gregelin's full-sized avatar

Greg Elin gregelin

  • RegScale, Inc.
  • Knoxville, TN
  • 13:17 (UTC -04:00)
View GitHub Profile
@gregelin
gregelin / pyodide.html
Created December 15, 2019 05:12
Example pyodide.html
<!DOCTYPE HTML>
<html>
<head>
<title>Pyodide</title>
<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>
</head>
<body>
<h1>My Pyodide Page</h2>
@gregelin
gregelin / ufeff_remove_bom.md
Created June 25, 2019 11:05
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
gregelin / Tests.md
Last active April 29, 2019 11:14
Testing GovReady-Q

This gist contains information on code scanning soon to be added to https://govready-q.readthedocs.io/en/latest/Test.html

Testing

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
gregelin / django_erd_steps.md
Created December 3, 2017 12:59
Generating ERD for django projects
# Install django-extensions
# http://django-extensions.readthedocs.io/en/latest/installation_instructions.html
pip3 install django-extensions

# Add django-extensions INSTALLED_APPS in siteapp > settings.py
# INSTALLED_APPS = (
#    ...
#    'django_extensions',
# )
@gregelin
gregelin / creating_compliance_apps.md
Last active November 17, 2020 09:45
Developing Compliance Apps

About

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
gregelin / README.md
Created August 10, 2017 10:59
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
<html>
<head>
<title>MySite</title>
</head>
<body>
<h1>Welcome To MySite</h1>
<p>This is a worked example of patching source code.</p>
</body>
</html>
@gregelin
gregelin / GIF-Screencast-OSX.md
Created June 7, 2017 11:28 — forked from dergachev/GIF-Screencast-OSX.md
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

Instructions

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

@gregelin
gregelin / managing_compliance_snippets.md
Last active June 5, 2017 22:24
Draft blog post on Managing Compliance Snippets with OpenControl and ComplianceLib

Managing Compliance Snippets with OpenControl and ComplianceLib

Summary

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

@gregelin
gregelin / fail2band_commands.md
Created March 29, 2017 02:09
fail2ban commands
# 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