Skip to content

Instantly share code, notes, and snippets.

View wholevinski's full-sized avatar

Wesley Holevinski wholevinski

View GitHub Profile
selinux steps:
# Check for any avc_denied
vi /var/log/audit/audit.log
# Gives a snippet for each denied as to why
audit2allow -w -a
# Shows what allow directives would allow the denied actions
audit2allow -a
@wholevinski
wholevinski / screenshot.js
Last active May 3, 2016 18:37
Verbatim screenshot
(function (exports) {
function urlsToAbsolute(nodeList) {
if (!nodeList.length) {
return [];
}
var attrName = 'href';
if (nodeList[0].__proto__ === HTMLImageElement.prototype
|| nodeList[0].__proto__ === HTMLScriptElement.prototype) {
attrName = 'src';
}
@wholevinski
wholevinski / index.html
Last active December 17, 2015 13:16 — forked from kerryrodden/.block
Sequences sunburst
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sequences sunburst</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<link rel="stylesheet" type="text/css"
href="https://fonts.googleapis.com/css?family=Open+Sans:400,600">
<link rel="stylesheet" type="text/css" href="sequences.css"/>
</head>
def get_digits(input):
digits = []
exponent = 1
while True:
mod_result = (input % (10 ** exponent))
digit = mod_result / (10 ** (exponent - 1))
digits.append(digit)
if mod_result == input:
break
exponent += 1