This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
history_snippet = '''Start-Date: 2014-08-25 12:52:37 | |
Commandline: apt-get install -y openjdk-6-jdk openjdk-7-jdk icedtea-7-plugin | |
Install: openjdk-6-jre-lib:amd64 (6b32-1.13.4-4ubuntu0.14.04.1, automatic), icedtea-netx-common:amd64 (1.5-1ubuntu1, automatic), openjdk-6-jdk:amd64 (6b32-1.13.4-4ubuntu0.14.04.1), libxcb1-dev:amd64 (1.10-2ubuntu1, automatic), ttf-dejavu-extra:amd64 (2.34-1ubuntu1, automatic), icedtea-6-jre-cacao:amd64 (6b32-1.13.4-4ubuntu0.14.04.1, automatic), icedtea-7-plugin:amd64 (1.5-1ubuntu1), libxau-dev:amd64 (1.0.8-1, automatic), openjdk-6-jre-headless:amd64 (6b32-1.13.4-4ubuntu0.14.04.1, automatic), x11proto-core-dev:amd64 (7.0.24-1, automatic), libxt-dev:amd64 (1.1.4-1, automatic), openjdk-7-jdk:amd64 (7u65-2.5.1-4ubuntu1~0.14.04.1), libx11-dev:amd64 (1.6.2-1ubuntu2, automatic), x11proto-kb-dev:amd64 (1.0.6-2, automatic), openjdk-6-jre:amd64 (6b32-1.13.4-4ubuntu0.14.04.1, automatic), xtrans-dev:amd64 (1.3.2-1, automatic), libxdmcp-dev:amd64 (1.1.1-1, automatic), icedtea-netx:a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit necessary permissions | |
sudo chmod 777 /var/lib/lockdown | |
# Install dependencies | |
sudo apt-get -y install build-essential git libplist-dev libssl-dev libusbmuxd-dev libxml2-dev pkg-config python-dev usbmuxd | |
# Build libplist dependency | |
git clone https://github.com/libimobiledevice/libplist.git | |
cd libplist | |
./autogen.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The preferred way to install a newer version of Remmina is this PPA: | |
# sudo apt-add-repository -y ppa:remmina-ppa-team/remmina-next | |
# sudo apt-get update | |
# sudo apt-get install -y libfreerdp-plugins-standard remmina | |
# Kill any running instances of Remmina | |
killall remmina | |
# Remove old Remmina packages | |
sudo apt-get --purge remove freerdp-x11 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "time" | |
func main() { | |
var filetime int64 = 129472648056962786 | |
fmt.Println(time.Unix(convertFiletimeToUnix(filetime), 0)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install libgranite-dev 0.2 and prerequisites | |
wget https://launchpad.net/~elementary-os/+archive/ubuntu/stable/+files/gir1.2-granite-1.0_0.2.3.1~r662-0%2Bpkg55~ubuntu12.04.1_amd64.deb | |
wget https://launchpad.net/~elementary-os/+archive/ubuntu/stable/+files/libgranite-common_0.2.3.1~r662-0%2Bpkg55~ubuntu12.04.1_all.deb | |
wget https://launchpad.net/~elementary-os/+archive/ubuntu/stable/+files/libgranite-dev_0.2.3.1~r662-0%2Bpkg55~ubuntu12.04.1_amd64.deb | |
wget https://launchpad.net/~elementary-os/+archive/ubuntu/stable/+files/libgranite1_0.2.3.1~r662-0%2Bpkg55~ubuntu12.04.1_amd64.deb | |
sudo dpkg -i gir1.2-granite-1.0_0.2.3.1~r662-0+pkg55~ubuntu12.04.1_amd64.deb libgranite-common_0.2.3.1~r662-0+pkg55~ubuntu12.04.1_all.deb libgranite-dev_0.2.3.1~r662-0+pkg55~ubuntu12.04.1_amd64.deb libgranite1_0.2.3.1~r662-0+pkg55~ubuntu12.04.1_amd64.deb | |
rm gir1.2-granite-1.0_0.2.3.1~r662-0+pkg55~ubuntu12.04.1_amd64.deb libgranite-common_0.2.3.1~r662-0+pkg55~ubuntu12.04.1_all.deb libgranite-dev_0.2.3.1~r662-0+pkg55~ubuntu1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See here for JDK 8: https://gist.github.com/bmaupin/87631863d55e2accc05ca7759247f887 | |
# See here for test to make sure this works: https://gist.github.com/evaryont/6786915 | |
if grep -q -i "release 6" /etc/*release; then | |
jce_primary_link_dir=/usr/lib/jvm/jre-1.7.0-oracle.x86_64/lib/security | |
elif grep -q -i "release 7" /etc/*release; then | |
jce_primary_link_dir=/usr/lib/jvm/jce-1.7.0-oracle | |
fi | |
wget \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get latest version from https://golang.org/dl/ | |
go_version=1.9.2 | |
sudo -v | |
# Clean up old versions | |
sudo apt-get remove golang-go | |
sudo rm -rf /usr/local/go | |
wget https://storage.googleapis.com/golang/go$go_version.linux-amd64.tar.gz | |
sudo tar -C /usr/local -xvf go$go_version.linux-amd64.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd if=/dev/zero of=system_new.img bs=4k count=600 | |
mkfs.ext4 -F system_new.img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
search_bytes = b'\x53\xef' | |
with open('system.raw.img.tmp', 'rb') as f: | |
i = 0 | |
while True: | |
byte = f.read(1) | |
if not byte: | |
break | |
elif byte == search_bytes[i:i+1]: | |
i += 1 | |
elif byte == search_bytes[0:1]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LANG=C grep -aobP -m1 '\x53\xEF' system.raw.img.tmp | head -1 | awk '{print $1 - 1080}' |
OlderNewer