Skip to content

Instantly share code, notes, and snippets.

View jeffreykog's full-sized avatar

Jeffrey Kog jeffreykog

View GitHub Profile
@jeamland
jeamland / playlist_extractor.py
Last active September 14, 2021 21:29
iTunes Library (non-XML) playlist extractor
#!/usr/bin/env python
# Extract playlists from a non-XML iTunes Library file (.itl)
# Copyright (c) 2018 Benno Rice, released under the BSD (2 Clause) Licence.
# Important information on the encryption used in the .itl file found here:
# https://mrexodia.cf/reversing/2014/12/16/iTunes-Library-Format-1
# Highly useful information on the .itl format itself found here:
# https://github.com/josephw/titl/blob/master/titl-core/src/main/java/org/kafsemo/titl/ParseLibrary.java
@samrocketman
samrocketman / libimobiledevice_ifuse_Ubuntu.md
Last active January 11, 2024 22:47
On Ubuntu 16.04, since iOS 10 update, libimobiledevice can't connect to my iPhone. This is my attempt to document a fix.

Why this document?

I upgraded my iPhone 5s to iOS 10 and could no longer retrieve photos from it. This was unacceptable for me so I worked at achieving retrieving my photos. This document is my story (on Ubuntu 16.04).

The solution is to compile libimobiledevice and ifuse from source.

Audience

Who is this guide intended for?

@zonque
zonque / dmx-udp.c
Last active September 13, 2022 16:56
/*
* Simple proxy between USB2DMX adapter cables and UDP senders
*
* Compile with:
*
* gcc -o dmx-udp dmx-udp.c $(pkg-config --cflags --libs libftdi1) -Wall
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
service {
dhcp-server {
disabled false
dynamic-dns-update {
enable true
}
global-parameters "key rndc-key { algorithm HMAC-MD5; secret paste_your_ddns_secret_here; };"
global-parameters "zone home.local. { primary 10.1.2.2; key rndc-key; }"
global-parameters "ddns-domainname "home.local.";"
global-parameters "ddns-rev-domainname "in-addr.arpa.";"
@Dhertz
Dhertz / Ubuntu_Aerial.md
Last active March 28, 2023 02:06
Quick overview of how to get Apple's new TV screensavers working on most linux systems.

Using Apple’s Aerial Screensavers on Ubuntu After coming across the [Aerial] (https://github.com/JohnCoates/Aerial) screensavers for Mac, and installing them, I decided that I had had enough of the graphics-demos of my Ubuntu Precise system. I hope to provide a simple guide on how to add them to your setup as well.

First, you need to install xscreensaver (for example with aptitude, but your distro should have it):

sudo aptitude install xscreensaver
@xrstf
xrstf / letsencrypt.md
Last active April 18, 2023 05:01
Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.

As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).

Configuration

For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:

{
"rolls": {
"min": 2,
"max": 6
},
"items": [
{
"item": "minecraft:diamond",
"weight": 5,
"functions": [
@mrexodia
mrexodia / Decrypted iTunes Library.grammar
Created December 27, 2014 00:26
Decrypted iTunes Library File Format
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.9">
<grammar name="Decrypted iTunes Library" start="id:148" author="Mr. eXoDia" email="mr.exodia.tpodt@gmail.com" fileextension="itl" uti="com.apple.itunes.db">
<description>Grammar for decrypted iTunes Library files.</description>
<structure name="Defaults" id="149" repeatmin="0" repeatmax="-1" encoding="ISO_8859-1:1987" endian="little" signed="no"/>
<structure name="iTunes Library" id="148" repeatmin="0" repeatmax="-1" extends="id:149" order="variable">
<structref name="hdfm" id="152" repeatmin="0" repeatmax="-1" structure="id:151"/>
<structref name="msdh" id="154" repeatmin="0" repeatmax="-1" structure="id:153"/>
</structure>
<structure name="hdfm" id="151" length="this.headerLength" repeatmin="0" repeatmax="-1" extends="id:149" endian="big">
@mrexodia
mrexodia / Encrypted iTunes Library.grammar
Created December 16, 2014 20:27
Encrypted iTunes Library File Format
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.9">
<grammar name="Encrypted iTunes Library" start="id:4" author="Mr. eXoDia" email="mr.exodia.tpodt@gmail.com" fileextension="itl" uti="com.apple.itunes.db">
<description>Grammar for encrypted iTunes Library files.</description>
<structure name="Defaults" id="5" encoding="ISO_8859-1:1987" endian="little" signed="no"/>
<structure name="iTunes Library" id="4" extends="id:5">
<structref name="hdfm" id="8" structure="id:7"/>
<binary name="encryptedData" id="9" length="remaining">
<description>This chunk of data is encrypted using AES/ECB/NoPadding with the key &quot;BHUILuilfghuila3&quot;. After decryption, you have to inflate the data using ZLIB.
@TagPro-PreciousRoy
TagPro-PreciousRoy / pulseaudio-5.0.diff
Last active August 29, 2015 14:06
Homebrew formula for pulseaudio 5.0 on Mac OS 10.9.5
diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
index 4e77ae9..eb1ae73 100755
--- a/src/daemon/default.pa.in
+++ b/src/daemon/default.pa.in
@@ -75,7 +75,7 @@ load-module module-udev-detect
.ifexists module-detect@PA_SOEXT@
])dnl
### Use the static hardware detection module (for systems that lack udev support)
-load-module module-detect
+#load-module module-detect