Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am plfiorini on github.
  • I am plfiorini (https://keybase.io/plfiorini) on keybase.
  • I have a public key whose fingerprint is 7D98 B067 FFEF DAA5 F894 1D4C DFA9 8DBF 9700 12EE

To claim this, I am signing this object:

@plfiorini
plfiorini / mount.iso.psm1
Created January 14, 2017 14:52 — forked from Thermionix/mount.iso.psm1
powershell mount/unmount iso for all versions of windows
# Uses http://www.ltr-data.se/opencode.html/#ImDisk virtual disk driver for windows 7 or less
# Tries to use chocolatey to install imdisk
# Sample use case:
# Import-Module ".\mount.iso.psm1"
# Invoke-IsoExe "C:\test.iso" "setup.exe" "/passive"
function Mount-Iso([string] $isoPath)
{
if ( -not (Test-Path $isoPath)) { throw "$isoPath does not exist" }
@plfiorini
plfiorini / grace.go
Last active September 12, 2015 13:46 — forked from rcrowley/grace.go
Graceful stop in Go
package main
import (
"log"
"net"
"os"
"os/signal"
"sync"
"syscall"
"time"
@plfiorini
plfiorini / decrypt.py
Last active September 4, 2015 12:55 — forked from nekoya/decrypt.py
Perl Crypy::CBC (Blowfish) -> Python Crypto
import base64
from Crypto.Cipher import Blowfish
from binascii import unhexlify
from struct import pack
key = unhexlify('144a6b229633360207ff9c79016fc49426f1814727b663bc39df05df9a1892073e2812df9492c1e952aac68d1ddfefba635d3a33aba21535') # "thisiskey"
iv = '123abc45'
def enc(str):
// decode Y, U, and V values on the YUV 420 buffer described as YCbCr_422_SP by Android
// David Manpearl 081201
public void decodeYUV(int[] out, byte[] fg, int width, int height)
throws NullPointerException, IllegalArgumentException {
int sz = width * height;
if (out == null)
throw new NullPointerException("buffer out is null");
if (out.length < sz)
throw new IllegalArgumentException("buffer out size " + out.length
+ " < minimum " + sz);
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.edb.launchd.postgresql-9.1</string>
<key>ProgramArguments</key>