This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from xml.dom.minidom import parse, parseString | |
| import os, sys, argparse, subprocess, uuid, re, time, getpass | |
| def hp_diagnostic_xml(output_filename): | |
| try: | |
| # Run a diagnostic, outputting to a temporary file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from HTMLParser import HTMLParser | |
| import sys, os | |
| class MLStripper(HTMLParser): | |
| def __init__(self): | |
| self.reset() | |
| self.fed = [] | |
| def handle_data(self, d): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import yaml, os, sys, subprocess | |
| venue_strings = ["booktitle", "journal", "institution"] | |
| with open(sys.argv[1], 'r') as fp: | |
| collection_yaml = yaml.load(fp.read()) | |
| transformed_entries = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun google-code-table-to-html () | |
| (interactive) | |
| (save-restriction | |
| (narrow-to-region (region-beginning) (region-end)) | |
| (goto-char (region-beginning)) | |
| (while (re-search-forward "^||" nil t) | |
| (replace-match "<tr><td>")) | |
| (goto-char (region-beginning)) | |
| (while (re-search-forward "||$" nil t) | |
| (replace-match "</td></tr>")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # -*- mode: shell-script -*- | |
| EXPECTED_ARGS=1 | |
| if [ $# -ne ${EXPECTED_ARGS} ] | |
| then | |
| echo "Usage: git_prune_remote <remote name>" | |
| exit 2 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """ | |
| Execute a child process, redirecting its output and error to files. If it's not | |
| done after a predetermined number of seconds, KILL IT WITH FIRE | |
| """ | |
| from optparse import OptionParser | |
| import shlex, subprocess, time, os, sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun markupserve-resource-dir-for-buffer (buffer) | |
| (concat (buffer-file-name buffer) "/../" (file-name-sans-extension | |
| (buffer-name buffer)) | |
| ".resources")) | |
| (defun markupserve-make-resource-directory () | |
| (interactive) | |
| (if (buffer-file-name (current-buffer)) | |
| (let ((dirname (markupserve-resource-dir-for-buffer (current-buffer)))) | |
| (make-directory dirname) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import os | |
| with open("names.txt", "r") as fp: | |
| for file_num, line in enumerate(fp): | |
| track_num = file_num + 1 | |
| artist, sep, title = line.strip().partition('-') | |
| artist = artist.strip() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "emacs-21.3.tar.gz": { | |
| "XML": { | |
| "files": 2, | |
| "comment": 106, | |
| "code": 4262, | |
| "blank": 91 | |
| }, | |
| "C": { | |
| "files": 181, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## in .bash_profile | |
| SSHAGENT=`which ssh-agent` | |
| SSHAGENTARGS="-s" | |
| if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then | |
| eval `$SSHAGENT $SSHAGENTARGS` | |
| trap "kill $SSH_AGENT_PID" 0 | |
| fi |