Skip to content

Instantly share code, notes, and snippets.

View paul-schwendenman's full-sized avatar

Paul Schwendenman paul-schwendenman

View GitHub Profile
@lopes
lopes / puck.sh
Created January 2, 2013 18:42
A DNS propagation checker in Shell Script.
#!/bin/bash
#puck.sh
# A DNS propagation checker. Fetches in many DNS servers around
# the world for IPs assigned to a given domain.
#
# Author: José Lopes de Oliveira Júnior <http://joselop.es>
#
#
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active June 9, 2024 04:58
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@alfredo
alfredo / gist:1542184
Created December 31, 2011 00:24
Install node.js and coffee-script inside a python virtualenv
To install node.js and coffee-script inside a virtualenv and keep it self-contained:
1. Activate the virtualenv::
$ workon test
2. Move inside the virtualenv directory::
(test)$ cdvirtualenv
@RobertSzkutak
RobertSzkutak / ircecho.py
Created October 30, 2011 21:15
Echo, a simple IRC bot written in Python 3
#!/usr/bin/env python3
# ircecho.py
# Copyright (C) 2011 : Robert L Szkutak II - http://robertszkutak.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
@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):
@brantfaircloth
brantfaircloth / sphinx_to_github.sh
Created January 23, 2011 02:40
Sphinx documentation to github gh-pages without submodules
# assume the following directory structure where contents of doc/
# and source/ are already checked into repo., with the exception
# of the _build directory (i,e. you can check in _themes or _sources
# or whatever else).
#
# proj/
# source/
# doc/
# remove doc/_build/html if present
@seanh
seanh / mergelog.py
Created April 25, 2010 18:50
A custom merge driver for git, for automatically merging my 'log.txt' file in a simplistic way.
#!/bin/env python
"""mergelog
This is a custom merge driver for git. It should be called from git
with a stanza in .git.config like this:
[merge "mergelog"]
name = A custom merge driver for my log.txt file.
driver = ~/scripts/mergelog %O %A %B %L
recursive = binary