Skip to content

Instantly share code, notes, and snippets.

View phracker's full-sized avatar

stuff i'd rather not have attributed to me phracker

View GitHub Profile
@phracker
phracker / unpackxip.md
Created August 5, 2018 20:40
Unpack XIP on Linux

Unpacking XIP files on Linux:

  1. Install xar from https://mackyle.github.io/xar/
  2. Install pbzx from https://github.com/NiklasRosenstein/pbzx (use gcc -llzma -lxar -I /usr/local/include pbzx.c -o pbzx and copy the binary into your PATH)
  3. use xar -xf XIP_FILE -C /path/to/extract/to
  4. Change to the directory where you extracted the file.
  5. Use pbzx -n Content | cpio -i to extract the contents.
@phracker
phracker / opentracker-tester.rb
Last active November 18, 2016 15:08 — forked from andresperezl/trackers-resolvs.rb
Given a list of trackers, this script will eliminate duplicates and unreachables.
#!/usr/bin/env ruby
require 'uri'
require 'resolv'
require 'optparse'
require 'net/http'
require 'socket'
require 'uri'
require 'timeout'
diff --git Makefile Makefile
index a1595a8..9fe7584 100644
--- Makefile
+++ Makefile
@@ -32,7 +32,7 @@ BINDIR=$(DESTDIR)$(bindir)
SBINDIR=$(DESTDIR)$(sbindir)
MANDIR=$(DESTDIR)$(mandir)
-LIBS_posix=
+LIBS_posix=-lm
@phracker
phracker / dblatex.rb
Last active January 27, 2022 15:05 — forked from dustinschultz/dblatex.rb
Updated dblatex install formula for Homebrew
require 'formula'
# BEFORE INSTALLING THIS FORMULA:
# 1.) Install MacTex or BasicTex from https://www.tug.org/mactex/
# 2.) Make yourself the owner of the tex installation directory:
# $ sudo chown -R "$(id -un):$(id -gn)" /usr/local/texlive
# 3.) Update tlmgr and install required packages
# $ tlmgr update --self
# $ tlmgr install appendix changebar footmisc multirow overpic stmaryrd subfigure titlesec wasysym
#!/bin/bash
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
#
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
# 3. Downloads the following from Oracle Website with one shell invocation.
@phracker
phracker / appify.sh
Last active August 29, 2015 14:12 — forked from advorak/appify.sh
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF
appify v3.0.0 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
# -*- coding:utf-8 -*-
import json
import sqlite3
JSON_FILE = "some.json"
DB_FILE = "some.db"
traffic = json.load(open(JSON_FILE))
conn = sqlite3.connect(DB_FILE)
@phracker
phracker / tmux.cheat
Last active August 29, 2015 14:08 — forked from afair/tmux.cheat
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &