Skip to content

Instantly share code, notes, and snippets.

View oldpatricka's full-sized avatar

Patrick Armstrong oldpatricka

View GitHub Profile
"""
Install dependencies with:
brew install zbar
virtualenv venv ; source venv/bin/activate
pip install pyzbar pillow
run with
python read-qr.py qr.png
@oldpatricka
oldpatricka / tiff-dump.go
Created November 6, 2018 20:23
Simple program to dump TIFF metadata
package main
// To run, first install github.com/google/tiff with:
// go get github.com/google/tiff
// Then run like `go run tiff-dump.go example.tif`
import (
"fmt"
"github.com/google/tiff"
"os"
@oldpatricka
oldpatricka / tiff-hdiff.go
Created November 2, 2018 20:46
Simple program to undiff TIFF horizontally diffed files
package main
// Run like `cat my.dif | go run tiff-hdiff.go`
import (
"bufio"
"fmt"
"os"
)
@oldpatricka
oldpatricka / tiff-lzw.go
Created November 2, 2018 20:32
Simple program to decompress TIFF-flavoured LZW compressed files
package main
// To run, first install image/tiff/lzw with:
// go get golang.org/x/image/tiff/lzw
// Then run like `cat my.lzw | go run tiff-lzw.go`
import (
"bufio"
"fmt"
"golang.org/x/image/tiff/lzw"
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<UILanguage>en-US</UILanguage>
int[] myarray = {1, 1, 2, 3, 5, 8};
int myarraylen = 6;
for (int i = 0; i<myarraylen; i++) {
puts(myarray[i]);
}
mylist = [1, 1, 2, 3, 5, 8, 13]
for i in range(0, len(mylist)-1):
print mylist[i]
mylist = [1, 1, 2, 3, 5, 8, 13]
for item in mylist:
print item
add-apt-repository ppa:wine/wine-builds
apt-get update
apt-get install --install-recommends winehq-devel
apt-get install build-essential dpkg-dev fakeroot autoconf automake autotools-dev mingw32 mingw64
apt-get build-dep wine
apt-get install mingw-w64
<html>
</head>
<body>
hi ian. Hash of "Message" is:
<span id="hash"></span>
</body>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.3.0/prototype.js"></script>
<script type="text/javascript">