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/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
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 python2 | |
from PIL import Image | |
import sys | |
import struct | |
def r8(f): | |
return ord(f.read(1)) | |
if len(sys.argv) <= 2: | |
print("Usage: %s <input> <output>" % sys.argv[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
from __future__ import print_function | |
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group | |
# (Any use permitted, subject to terms of PostgreSQL license; see.) | |
# If we have a 64-bit integer type, then a 64-bit CRC looks just like the | |
# usual sort of implementation. (See Ross Williams' excellent introduction | |
# A PAINLESS GUIDE TO CRC ERROR DETECTION ALGORITHMS, available from | |
# ftp://ftp.rocksoft.com/papers/crc_v3.txt or several other net sites.) |