Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env python3.2
import xml.etree.ElementTree as etree
import shutil
import os
first = 1
for fileName in os.listdir("."):
if ".nessus" in fileName:
print(":: Parsing", fileName)
@emory
emory / generator_scss.rb
Created August 11, 2012 16:54 — forked from parkr/generator_scss.rb
Jekyll Plugin to output SCSS without requiring the "---" YAML Front Matter
#
# Jekyll Generator for SCSS
#
# (File paths in this description relative to jekyll project root directory)
# Place this file in ./_plugins
# Place .scss files in ./_scss
# Compiles .scss files in ./_scss to .css files in whatever directory you indicated in your config
# Config file placed in ./_sass/config.rb
#
` #---TEST-IP-Addresses`
` while ($body =~ /X-IP-Addresses\:(.*)\n/gi){`
` my $ip = $1;`
` ($id,$msg) = $cf->LoadByNameAndQueue (Name=>'TEST-IP-Addresses', Queue=>$queue);`
` ($id,$msg) = $Ticket->AddCustomFieldValue (Field => $cf, Value =>$ip);`
` }`
#---TEST-IP-Addresses
while ($body =~ /X-IP-Addresses\:(.*)\n/gi){
my $ip = $1;
($id,$msg) = $cf->LoadByNameAndQueue (Name=>'TEST-IP-Addresses', Queue=>$queue);
($id,$msg) = $Ticket->AddCustomFieldValue (Field => $cf, Value =>$ip);
}
@emory
emory / ExportThingsToTaskPaper.scpt
Created October 19, 2012 21:52 — forked from joe-pindell/ExportThingsToTaskPaper.scpt
An Applescript to export from Things to TaskPaper
set thePath to (path to desktop as Unicode text) & "ThingsToDo.txt"
set thingsToDoFile to (open for access file thePath with write permission)
set eof of thingsToDoFile to 0
set cr to ASCII character 10
tell application "Things"
-- Export to-dos from Inbox
write "Inbox:" & return to thingsToDoFile as «class utf8»
repeat with td in to dos of list "Inbox"
#!/usr/bin/ruby
# WebExcursions, a script for gathering new Pinboard links with a certain tag
# and generating Markdown/Jekyll posts when enough are collected.
# Brett Terpstra 2013
#
# -f to force writing out current bookmarks to file regardless of count
%w[fileutils set net/https zlib rexml/document time base64 uri cgi stringio].each do |filename|
require filename
end
@emory
emory / gist:6678586
Created September 23, 2013 23:51
watch me spray logs with the greatest of ease
Sep 23, 2013 18:20:18 [0x808170400] DEBUG - OnBrowseMetadata for 'ce1e6c101aae79d6815b' with filter '@id,upnp:class,res,res@protocolInfo,res@av:authenticationUri,res@size,dc:title,upnp:albumArtURI,res@dlna:ifoFileURI,res@protection,res@bitrate,res@duration,res@sampleFrequency,res@bitsPerSample,res@nrAudioChannels,res@resolution,res@colorDepth,dc:date,av:dateTime,upnp:artist,upnp:album,upnp:genre,dc:contributer,upnp:storageFree,upnp:storageUsed,upnp:originalTrackNumber,dc:publisher,dc:language,dc:region,dc:description,upnp:toc,@childCount,upnp:albumArtURI@dlna:profileID,res@dlna:cleartextSize' and sort '', paged as 0 + 1
Sep 23, 2013 18:20:18 [0x808170400] DEBUG - Mapped client to profile PlayStation 3 using header X-AV-Client-Info: av=5.0; cn="Sony Computer Entertainment Inc."; mn="PLAYSTATION 3"; mv="1.0";
Sep 23, 2013 18:20:18 [0x808170400] DEBUG - Mapped object ce1e6c101aae79d6815b to /library/sections/1/recentlyAdded part 0 on server http://127.0.0.1:32400/
Sep 23, 2013 18:20:18 [0x808170400] DEBUG - Down
#!/bin/bash
#
# This script backups an OS X system to an external volume, effectively
# cloning it. It is based on [0], [1] and [2] for OS X and [3] and [4] for
# Linux. One could also use commercial tools like SuperDuper! or Carbon Copy
# Cloner. The latter website has an interesting list[5] on what files to
# exclude when cloning.
#
# Exclusions (from CCC[5]), see rsync_excludes_osx.txt
#
@emory
emory / 0_reuse_code.js
Created March 13, 2014 02:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@emory
emory / keybase.md
Last active August 29, 2015 13:58
201404041609 keybase proof emory@stickwell via 128.255.0.0/16

Keybase proof

I hereby claim:

  • I am emory on github.
  • I am emory (https://keybase.io/emory) on keybase.
  • I have a public key whose fingerprint is A8C4 D7D7 54C8 EABA 7964 3AE8 EB9C 9F2F 7EEB 0403

To claim this, I am signing this object: