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
gregelin / pyodide.html
Created Dec 15, 2019
Example pyodide.html
View 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 Jun 25, 2019
Remove BOM characters using vim (e.g., \ufeff)
View ufeff_remove_bom.md

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 Apr 29, 2019
Testing GovReady-Q
View Tests.md

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 Dec 3, 2017
Generating ERD for django projects
View django_erd_steps.md
# 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 Sep 29, 2017
Developing Compliance Apps
View creating_compliance_apps.md

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 Aug 10, 2017
Reclaiming space on Time Machine / Time Capsule
View README.md

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
<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 Jun 7, 2017 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

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 Jun 5, 2017
Draft blog post on Managing Compliance Snippets with OpenControl and ComplianceLib
View managing_compliance_snippets.md

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

View fail2band_commands.md
# 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.