Skip to content

Instantly share code, notes, and snippets.

View glenbot's full-sized avatar

Glen Zangirolami glenbot

View GitHub Profile
@zed
zed / ping.py
Created December 12, 2009 19:04
#!/usr/bin/env python
"""
A pure python ping implementation using raw socket.
Note that ICMP messages can only be sent from processes running as root.
Derived from ping.c distributed in Linux's netkit. That code is
@durden
durden / codrspace_processor.py
Created October 2, 2012 02:51
Custom processor for markedapp
#!/usr/bin/env python
"""
Simplified stand-alone script to mimic codrspace.com short code processing.
Script takes 1 optional argument, the path of your python environment.
The rest of the input is read directly from stdin and expected to be codrspace
markdown text. The output is codrspace html after all markdown and codrspace
specific short codes have been processed.
@cpswan
cpswan / IPsec_example.sh
Created July 23, 2015 20:46
VNS3 IPsec tunnel example
#!/bin/bash
# Set credentials and address for VNS3 manager
VNS3_PW=pa55Word
VNS3_IP=10.11.22.33
# Use IPsec connection 2
VNS3_EP=2
# Clear out any existing IPsec tunnels
while true; do
TUNNEL=$(curl -s -k -X GET -u api:"$VNS3_PW" \
https://"$VNS3_IP":8000/api/ipsec | python -mjson.tool \