Skip to content

Instantly share code, notes, and snippets.

View jstangroome's full-sized avatar

Jason Stangroome jstangroome

View GitHub Profile
@huyng
huyng / reflect.py
Created February 7, 2011 17:57
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@tathamoddie
tathamoddie / RequiresPowerShell.bat
Created August 5, 2010 03:48
Batch file to automatically detect, download and install PowerShell 2 on to an XP SP3 machine
@echo off
REM If PowerShell 2 is not installed, this script will automatically download and install it.
REM Only works on XP SP3 with .NET 3.5. Only for dev boxes, not designed for servers.
REM Based on http://blog.codeassassin.com/2009/12/10/no-web-browser-need-powershell/
ver | find "XP" > nul
if %ERRORLEVEL% neq 0 goto not_xp
ver | find "5.1.2600" > nul
@meklarian
meklarian / PZIAdapter.cpp
Created May 26, 2010 09:59
Source code for a Win32 DLL and a sample C# project demonstrating a single function that can be used to scrub out Persistent-Zone-Identifiers (PZIs) from files.
// PZIAdapter.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include "PZIAdapter.h"
// This is an example of an exported function.
PZIADAPTER_API DWORD _stdcall StripFilePZI(BSTR bstrFilename)
{
if(!bstrFilename){return E_INVALIDARG;}