Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<base href="/login/">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=.85">
<meta http-equiv="pragma" content="no-cache">
<title>Web Page Blocked</title>
@emyl
emyl / 60-syslog-minemeld.conf
Last active June 2, 2021 18:01
Palo Alto Minemeld support files
module(load="imtcp")
module(load="pmpanngfw")
module(load="mmnormalize")
module(load="omrabbitmq")
$template alljson,"%$!all-json%\n"
ruleset(name="pan-ngfw" parser=["rsyslog.panngfw", "rsyslog.rfc5424", "rsyslog.rfc3164"]) {
action(type="mmnormalize" rulebase="/etc/rsyslog.d/palo_alto_networks.rb" userawmsg="on")
if strlen($!unparsed-data) == 0 then {
@emyl
emyl / ospf2-networks.nse
Created October 24, 2016 20:40
NSE script for discovering IPv4 networks using Open Shortest Path First version 2(OSPFv2) protocol.
local bin = require "bin"
local ipOps = require "ipOps"
local nmap = require "nmap"
local ospf = require "ospf"
local packet = require "packet"
local stdnse = require "stdnse"
local target = require "target"
description = [[
Discover IPv4 networks using Open Shortest Path First version 2(OSPFv2) protocol.
@emyl
emyl / sudo.bat
Created June 12, 2014 10:20
Wrapper for sudo command on cygwin
@echo off
setlocal enableDelayedExpansion
set /a flags=0
set /a trim=1
for %%i in (%*) do (
set param=%%i
if "!param:~0,1!" == "-" (
set /a flags+=1
@emyl
emyl / install.cmd
Created February 18, 2014 11:09
Install vagrant-librarian-chef on Windows
REM Ensure that vagrant-berkshelf is not installed (it conflicts with vagrant-librarian-chef)
vagrant plugin uninstall vagrant-berkshelf
REM Install the plugin
vagrant plugin install vagrant-librarian-chef
REM Remove conflicting versions of the ffi gem from .vagrant.d
set GEM_HOME=%USERPROFILE%\.vagrant.d\gems
C:\HashiCorp\Vagrant\embedded\bin\gem uninstall ffi --ignore-dependencies --version ">1.5.0"
@emyl
emyl / Vagrantfile
Created February 14, 2014 16:29
djenkins Vagrantfile
require "json"
Vagrant.configure("2") do |config|
config.vm.define "djenkins" do |djenkins|
djenkins.vm.box = "raring64_chef11"
djenkins.vm.box_url = "http://goo.gl/Y4aRr"
# Configuration for vagrant-omnibus plugin
djenkins.omnibus.chef_version = :latest
@emyl
emyl / foundation_template.rb
Last active January 2, 2016 08:59
Padrino template for Zurb Foundation. Works with: Stylesheet engine: Compass/Scss/None Template engine: Erb/Haml/Slim
# Template for a Zurb Foundation app. It uses Bower to manage frontend resources.
opts = options.dup
opts.delete("template")
# Check for valid template engine.
until ["erb", "haml", "slim"].include?(opts["renderer"])
opts["renderer"] = ask(
"Foundation is not compatible with #{opts["renderer"]} template engine. Choose another one [erb|haml]",
"slim"
)
@emyl
emyl / Vagrantfile
Created December 14, 2013 10:14
Vagrant + Docker = Wordpress
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.network :forwarded_port, :guest => 8080, :host => 8080
config.vm.provision "docker" do |d|
d.pull_images "jbfink/docker-wordpress"
d.run "jbfink/docker-wordpress", :args => "-d -p 8080:80"
end
end
@emyl
emyl / xs_raid_step1.sh
Last active December 27, 2015 18:49
RAID setup for Citrix Xenserver 6.x
#!/bin/bash
echo "o
Y
n
1
2048
8388641
FD00
n
@emyl
emyl / softlayer_destroy.rb
Created October 28, 2013 10:42
SoftLayer CCI destroy test
require "softlayer_api"
id = 2841947
sl = SoftLayer::Service.new('SoftLayer_Virtual_Guest',
:api_key => "<my_api_key>",
:username => "<my_username>"
)
sl.object_with_id(id).deleteObject