Skip to content

Instantly share code, notes, and snippets.

View MarkTzen's full-sized avatar

Mark Tzen MarkTzen

View GitHub Profile
@gregelin
gregelin / python_test_framework_rd.md
Last active April 2, 2019 08:30
Research on Python test frameworks for ATDD (Acceptance Testing Driven Development)

What am I trying to do?

Working with SCAP is daunting. I'm in the "Sho" stage of "Sho Ha Re". SCAP is running, but only because I am following specific directions. There are hundreds of selected controls for SSG and STIG using SCAP. The basic runs only passes about half of the tests and there are many tests not even selected.

Breaking the STIG down would be helpful. For example, there are only 17 "Severity: High" tests. Wouldn't it make sense to have a test file that tests only for those 17?

What I'm trying to do is to create a simpler version of a STIG, a STIG that only tests a single control, or only the 17 "high" severity tests. I could of course manually pull out these tests. And I may do that. But a smarter approach would be to programatically build a small subset from the published source material. That way, I'm extracting the code.

I'm committed to acceptance test driven development. So I want the extracted controls. I need to write code to extract the controls. I need a way of testing my extr

@arunoda
arunoda / gist:7790979
Last active March 13, 2025 14:30
Installing SSHPass

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

@cburgmer
cburgmer / SpecRunner.html
Created April 3, 2012 19:37
Using Gradle & ANT to get JUnit XML results (e.g. from Jasmine) in HTML
<!DOCTYPE html>
<html>
<head>
<title>Jasmine Spec Runner</title>
<link rel="stylesheet" type="text/css" href="../lib/jasmine-1.1.0/jasmine.css">
<script type="text/javascript" src="../lib/jasmine-1.1.0/jasmine.js"></script>
<script type="text/javascript" src="../lib/jasmine.junit_reporter.js"></script>
</head>
<script type="text/javascript">
jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter('../../build/reports/jasmine/', false)); // don't consolidate so that JUnitReport can pick up the XML
@mejibyte
mejibyte / gist:1233426
Created September 21, 2011 21:50
My implementation of Aho-Corasick's algorithm for string matching.
using namespace std;
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <sstream>
#include <fstream>
#include <cassert>
#include <climits>
#include <cstdlib>
@nickfloyd
nickfloyd / gist:1046526
Created June 25, 2011 14:11
Powershell basic authentication
//This returns a 404 not found - powershell; I expected a 401 if my creds were bad
$Url = "https://github.com/api/v2/xml/commits/list/fellowshiptech/portal/Portal_2011.6.23_15-26"
$webclient = new-object system.net.webclient
$webclient.credentials = new-object system.net.networkcredential("user", "password")
$result = $webclient.DownloadString($Url)
$result
//This returns the data I want via terminal
curl -u user:password https://github.com/api/v2/xml/commits/list/fellowshiptech/portal/Portal_2011.6.23_15-26