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
(* | |
Copyright (c) 2008, Christian Mittendorf <christian.mittendorf@googlemail.com> | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
Redistributions of source code must retain the above copyright notice, this | |
list ofconditions and the following disclaimer. Redistributions in binary form | |
must reproduce the above copyright notice, this list of conditions and the |
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
import re | |
from hashlib import md5 | |
def gfm(text): | |
# Extract pre blocks. | |
extractions = {} | |
def pre_extraction_callback(matchobj): | |
digest = md5(matchobj.group(0)).hexdigest() | |
extractions[digest] = matchobj.group(0) | |
return "{gfm-extraction-%s}" % digest |
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 package-update-all () | |
"Update all packages" | |
(interactive) | |
(dolist (elt package-alist) | |
(let* ((name (car elt)) | |
(file-name (symbol-name name)) | |
(available-pkg (assq name package-archive-contents)) | |
(available-version (and available-pkg | |
(package-desc-vers (cdr available-pkg)))) | |
(current-version (package-desc-vers (cdr elt))) |
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
#speaker-note { | |
position:absolute; | |
left: 0; | |
top: 80%; | |
width: 100%; | |
height: 20%; | |
z-index: 8; | |
opacity: 0.75; | |
background-color: white; | |
overflow: auto; |
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
;;; cedet-1.1-startup.el --- Working configuration for CEDET 1.1 & below | |
;; Copyright (C) Alex Ott | |
;; | |
;; Author: Alex Ott <alexott@gmail.com> | |
;; Keywords: CEDET 1.1, | |
;; Requirements: CEDET 1.1 or below | |
(load-file "~/tmp/cedet-1.1/common/cedet.el") | |
(require 'semantic-decorate-include) |
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/sh | |
# GNU coreutils | |
brew install coreutils | |
brew install findutils | |
brew install binutils | |
brew install patchutils | |
# gdb & gcc | |
brew install gdb |
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
# Class for managing multiple servers or anything with start() and stop() methods | |
class ServerRack(object): | |
def __init__(self, servers): | |
self.servers = servers | |
def start(self): | |
started = [] | |
try: |
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
# coding: utf-8 | |
""" | |
a proof of concept implementation of SQLite FTS tokenizers in Python | |
""" | |
from __future__ import print_function, unicode_literals | |
import sys | |
import ctypes | |
from ctypes import POINTER, CFUNCTYPE | |
import struct |
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/pythonw | |
# | |
# Modified by Michael Bianco <info@cliffsidedev.com> on June 26, 2009 | |
# Written by Thomas Pan at January 21, 2007 | |
# mysql2graffle for Omnigraffle 5 is based on | |
# MyDBGraffle for OmniGraffle 4 which is based on Paul Davis' work at http://www.visualdistortion.org | |
# | |
# Requires: | |
# | |
# OmniGraffle 5 |
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
(require 'svg) | |
;; Rounded boxes using SVG: | |
;; This could be made into a function but size of text needs to be computed | |
(defun tag (text &optional foreground background font-size) | |
(let* ((font-size (or font-size 12)) | |
;; The char-width ratio depends on the font family | |
(char-width (* font-size 0.58)) | |
(char-height (+ font-size 1)) |
OlderNewer