Skip to content

Instantly share code, notes, and snippets.

Adam Seering aseering

Block or report user

Report or block aseering

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View launch_win.sh
#!/bin/bash
WIN_ARG=""
until [[ "$1" != *"="* ]]; do
WIN_ARG="$WIN_ARG SET $1 &&"
shift
done
WIN_ARG="$WIN_ARG $@"
@aseering
aseering / ionice
Last active Aug 10, 2016
'ionice' stub
View ionice
#!/bin/dash
##########
#
# 'ionice' wrapper script
#
# Use this stub if you're running in an environment where 'ionice' is
# not supported and not strictly required, but it's
# used as a convenience by some script that you need to run.
#
View Simple DNS server (UDP and TCP) in Python using dnslib.py
# coding=utf-8
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import datetime
import sys
import time
import threading
import traceback
import SocketServer
View winpath,sh
#!/bin/bash
echo "$@" | sed -e 's|\\|/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/mnt/\L\1\E/\2|'
View dev_fd_ldpreload.c
#define _GNU_SOURCE
#include <sys/types.h>
#include <dlfcn.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
static int (*real_open)(const char *pathname, int flags, int mode);
/* static ssize_t (*real_write)(int fd, const void *buf, size_t count); */
@aseering
aseering / ntlmdecoder.py
Last active Nov 18, 2019
NTLM auth-string decoder
View ntlmdecoder.py
#!/usr/bin/env python
## Decodes NTLM "Authenticate" HTTP-Header blobs.
## Reads the raw blob from stdin; prints out the contained metadata.
## Supports (auto-detects) Type 1, Type 2, and Type 3 messages.
## Based on the excellent protocol description from:
## <http://davenport.sourceforge.net/ntlm.html>
## with additional detail subsequently added from the official protocol spec:
## <http://msdn.microsoft.com/en-us/library/cc236621.aspx>
##
@aseering
aseering / spymemcached_jython.py
Created Nov 24, 2012
Django spymemcached Jython cache backend.
View spymemcached_jython.py
"""
A memcached library for Jython. Wraps spymemcached.jar.
Very lightly tested; use at your own risk!
Depends on spymemcached (<http://code.google.com/p/spymemcached/>).
No fancy features, but it shouldn't be hard to extend.
"""
from java.net import InetSocketAddress
from net.spy.memcached import MemcachedClient, BinaryConnectionFactory
You can’t perform that action at this time.