This file contains 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 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 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 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 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
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
int main(int argc, char **argv) { | |
sync(); | |
int fd = open("/proc/sys/vm/drop_caches", O_WRONLY); |
This file contains 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
% Allow breaking at both hyphens and spaces | |
\usepackage[hyphens,spaces]{url} | |
% A sequence of BigBreaks will be treated as one break, so it will only be able to break after :// | |
\renewcommand{\UrlBigBreaks}{\do\:\do\/} | |
% (Less aggressive) Treat both / and - as breakable characters (don't know why this does something different than hyphens in the package declaration, but it does) | |
\renewcommand{\UrlBreaks}{\do\/\do\-} | |
% (More aggressive) Any letter and / are treated as breakable characters |
This file contains 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 PIL import Image | |
import sys | |
im = Image.open(sys.argv[1]) | |
def scale_to_width(dimensions, width): | |
height = (width * dimensions[1]) / dimensions[0] |
This file contains 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 | |
if [ $# -ne 2 ] | |
then | |
echo "Usage: sfq.sh <enable|disable> <device>" | |
exit 1 | |
fi | |
COMMAND=$1 | |
DEVICE=$2 |
This file contains 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
the three a's of awesome | |
the three a's of marriage | |
the three a's in a relationship | |
the three b's of baseball | |
the three c's of life | |
the three c's of a relationship | |
the three e's of sustainable development | |
the three e's of fire prevention | |
the three e's of leadership | |
the three f's of life |
This file contains 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 | |
set -e | |
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \ | |
"/usr/local/lib/libosxfuse_i32.2.dylib" \ | |
"/usr/local/lib/libosxfuse_i64.2.dylib" \ | |
"/usr/local/lib/libmacfuse_i64.2.dylib" \ | |
"/usr/local/lib/libosxfuse_i32.la" \ | |
"/usr/local/lib/libosxfuse_i64.la" \ |