Skip to content

Instantly share code, notes, and snippets.

Patrick Armstrong oldpatricka

View GitHub Profile
@oldpatricka
oldpatricka / tiff-dump.go
Created Nov 6, 2018
Simple program to dump TIFF metadata
View tiff-dump.go
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 Nov 2, 2018
Simple program to undiff TIFF horizontally diffed files
View tiff-hdiff.go
package main
// Run like `cat my.dif | go run tiff-hdiff.go`
import (
"bufio"
"fmt"
"os"
)
@oldpatricka
oldpatricka / tiff-lzw.go
Created Nov 2, 2018
Simple program to decompress TIFF-flavoured LZW compressed files
View tiff-lzw.go
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"
View AutoUnattend.xml
<?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>
View gist:07f47d01dd0f86e5eeacc58412c6bf99
int[] myarray = {1, 1, 2, 3, 5, 8};
int myarraylen = 6;
for (int i = 0; i<myarraylen; i++) {
puts(myarray[i]);
}
View gist:aaba2217b56275c31ef1df008152520e
mylist = [1, 1, 2, 3, 5, 8, 13]
for i in range(0, len(mylist)-1):
print mylist[i]
View setup-wine-build-deps.sh
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
View -
<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">
View -
<html>
</head>
<body>
hi ian. Hash of "Message" is:
<span id="hash"></span>
</body>
<head>
<script type="text/javascript">
var CryptoJS = CryptoJS || function(h, s) {
You can’t perform that action at this time.