Skip to content

Instantly share code, notes, and snippets.

@jro
jro / hailstorm.xml
Created October 2, 2012 19:11
Cenzic Hailstorm.xml
<?xml version="1.0" encoding="utf-8" ?>
<Assessments>
<AssessmentRunData RequestId="" AssessmentRunId="aacd295a-7d4c-4363-92e3-cd84fbe9b08b">
<SmartAttacks>
<SmartAttacksData>
<SmartAttackInfo>
<SmartAttackName>File &amp; Directory Discovery - [OWASP 2010 A 8]</SmartAttackName>
<Description>...this is the description...</Description>
<HowItWorks>...this is how it works...</HowItWorks>
<Impact>...</Impact>
@jro
jro / base_role.json
Created October 21, 2011 04:14
mod_security: configure mod_security
{
"name": "base",
"chef_type": "role",
"json_class": "Chef::Role",
"description": "The base role for our test",
"run_list": [
"recipe[chef-client]",
"recipe[apache2]",
"recipe[mod_security]"
],
@jro
jro / hosts
Created October 21, 2011 04:12
mod_security: baseline test
127.0.0.1 localhost localhost.localdomain
127.0.0.1 demo.testfire.net.local
@jro
jro / base_role.json
Created October 21, 2011 03:57
mod_security: prepare chef-repo
{
"name": "base",
"chef_type": "role",
"json_class": "Chef::Role",
"description": "The base role for our test",
"run_list": [
"recipe[chef-client]",
"recipe[apache2]",
"recipe[mod_security]"
]
@jro
jro / chef-client.conf.erb
Created July 8, 2011 01:14
bootstrapping chef nodes on top of REE
# cookbooks/chef-client/templates/default/chef-client.conf.erb
# chef-client - Chef Configuration Management Client
#
# Chef Client provides the Chef configuration management daemon
description "Chef Client"
start on filesystem
stop on runlevel [!2345]
@jro
jro / gist:950202
Created May 1, 2011 02:53
erc system notification hook
(require 'notifications)
(defun erc-global-notify (match-type nick message)
"Notify when a message is recieved."
(notifications-notify
:title nick
:body message
:app-icon "/usr/share/notify-osd/icons/gnome/scalable/status/notification-message-im.svg"
:urgency 'low))
(add-hook 'erc-text-matched-hook 'erc-global-notify)
@jro
jro / gist:898774
Created April 1, 2011 20:15
grep with context to yaml
export FILE=/tmp/some_file && echo '- |' > $FILE && grep -5r something somefiles*.* | sed -e 's/^/ /g' | sed -e 's/^ --/- |/g' >> $FILE
# now you should have a valid yaml list of blocks of text.
var liveToggler = new Element('input', {
'type': 'checkbox',
'id': this.parentElement + '-live',
'name': 'live',
'events': {
'click': function() {
this.options.live = !this.options.live
}.bind(this)
},
'styles': {
<script type="text/javascript">
var starts_in = 600;
var starts_in_url = 'http://' + window.location.host + window.location.pathname + '/starts_in';
function play_video() {
//alert("Playing");
$("video")[0].play();
setInterval("showNote();", 30000);
}
def start_time
if @screen
# This has to be done by the server in case the clocks are different
# on the client
start_time = Time.now + 2.minutes
respond_with (start_time - Time.now).json
else
render(:status => 404)
end
end