Skip to content

Instantly share code, notes, and snippets.

View dsturnbull's full-sized avatar

David Turnbull dsturnbull

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dsturnbull on github.
  • I am dsturnbull (https://keybase.io/dsturnbull) on keybase.
  • I have a public key ASDJrXPUOE0I16smflbboyCSKa3dP5ZcpBVRMILS8YRaHwo

To claim this, I am signing this object:

10 PRINT "WHAT'S THE PASSWORD?"
20 INPUT, $A
30 IF $A == "DAVID RULZ" THEN GOTO 40 ELSE GOTO 50
40 PRINT "YOU RULE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
50 PRINT "WRONG, TRY AGAIN!"
60 GOTO 10
diff --git a/epan/dissectors/packet-gluster.h b/epan/dissectors/packet-gluster.h
index f023f62..1b18621 100644
--- a/epan/dissectors/packet-gluster.h
+++ b/epan/dissectors/packet-gluster.h
@@ -354,19 +354,6 @@ enum gf_fop_procnum {
GFS3_OP_MAXVALUE
};
-/* dir-entry types from libglusterfs/src/compat.h */
-enum gluster_entry_types {
diff --git a/print.c b/print.c
index bb4e691..30a765e 100644
--- a/print.c
+++ b/print.c
@@ -162,8 +162,6 @@ void proto_tree_print_node(proto_node *node, gpointer data)
{
field_info *fi = PNODE_FINFO(node);
print_data *pdata = (print_data*) data;
- const guint8 *pd;
- gchar label_str[ITEM_LABEL_LENGTH];
@dsturnbull
dsturnbull / gist:6927383
Created October 10, 2013 23:39
Mavericks doesn't like these, because it already includes strlcat and strlcpy somewhere.
diff --git a/src/strlcatu.h b/src/strlcatu.h
index 386f97a..a20f2dd 100644
--- a/src/strlcatu.h
+++ b/src/strlcatu.h
@@ -21,6 +21,4 @@
#ifndef __STRLCAT_H__
#define __STRLCAT_H__
-size_t strlcat(char *, const char *, size_t);
-
@dsturnbull
dsturnbull / gist:6927359
Created October 10, 2013 23:38
Fix y2k bug and show IPv6 addresses in RFC-blah format.
diff --git a/src/log_text.c b/src/log_text.c
index 7771bb0..7412016 100644
--- a/src/log_text.c
+++ b/src/log_text.c
@@ -557,7 +557,12 @@ void LogIpAddrs(TextLog *log, Packet *p)
}
else
{
- char *ip_fmt = "%s:%d -> %s:%d";
+ char *ip_fmt;
You can use cURL to upload packet captures to Packetloop. We created a simple script that shows how to login, list capture points, create capture points, upload and also check processing status.
## variables
PL_ENDPOINT=https://www.packetloop.com
PL_USERNAME=... # your packetloop email address
PL_PASSWORD=... # your packetloop password
## logging in
PL_TOKEN=$(curl -3 -s -b cookies.jar -c cookies.jar -X GET "$PL_ENDPOINT/init")
curl -3 -s -H "X-CSRF-Token: $PL_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -b cookies.jar -c cookies.jar -X POST "$PL_ENDPOINT/users/sign_in.json?pretty=true" -d "{ \"user\": { \"email\": \"$PL_USERNAME\", \"password\": \"$PL_PASSWORD\" } }"
@dsturnbull
dsturnbull / multibuffer.py
Created September 7, 2012 01:49
Multiple file buffer
import sys
from cStringIO import StringIO
class MultiBuffer():
def __init__(self, *files):
self.files = files
self.i = 0
def read(self, length):
[alias]
br = "!git branch --no-merged | while read x; do printf \\\\033[31m%s\\\\033[0m\\\\n $x; git --no-pager log --pretty=oneline --abbrev-commit ..$x; echo; done"
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:8020</value>
<description>The name of the default file system. A URI whose