Skip to content

Instantly share code, notes, and snippets.

@z448
z448 / alios
Last active August 29, 2015 14:24
alias for ios that tracks uuid changes
#!/bin/bash
#ios7+
#Like alias + keeps track of changing UUIDs directory namesand updates path for alias when there is any change in path.
#First set up your mark ( use iFile, Filza.. ) by creating empty file 'somename.ME' in Documents folder of apps you want to access by alias (/var/mobile/Containers/Data/Application/<UUID>/Documents) and run 'alios && bash'
#Now you can jump through UUIDs just by typing 'somename'
#Will work even after backup/restore as marks are backed up in iCloud
##################### usage ###
## 0. create your name.ME ##
@z448
z448 / aplist.sh
Last active May 6, 2017 04:57
shell script for listing app bundle IDs, display names, UUIDs installed applications
#!/bin/bash
#see output in < aplst_setlinks.sh aplst_setvars appList.err appList.log appList.out >
#dep:plutil.pl
dataPath=/var/mobile/Containers/Data/Application
bundlePath=/var/mobile/Containers/Bundle/Application
mcmMetaPrefFile=.com.apple.mobile_container_manager.metadata.plist
itunesMetaPrefFile=iTunesMetadata.plist
myAppLinksFolder=/var/mobile/applinks
exec > >(tee appList.log)
@z448
z448 / getHtmlSrc.pl
Last active August 29, 2015 14:25
get .js & .css sources from html
#!/usr/bin/env perl
# downloads src .js and .css files from html; use if you are behind proxy and cant source external content
# usage
# ./getHtmlSrc.pl /path/to/some.html
# v0.2 - prints local links after src name
# v0.3 - archive (out.html.src.gz) then remove all .js & .css
# v0.4 - outputs out.html with swapped src files for local ones
use strict;
@z448
z448 / k760-setup-ubuntu.sh
Last active August 29, 2015 14:25
logitech k760 keyboard setup for ubuntu
#!/bin/bash
# setting up logitech k760 on ubuntu
# bluez-hcidump-2.5.tar.xz [http://www.bluez.org/download/]
# usage: sudo ./k760-setup-ubuntu.sh
function scan {
hcitool scan > $fl
}
if [ -f "$PWD/760.mac" ]; then
@z448
z448 / conf.runon
Last active September 21, 2015 01:39
CLI tool for remote command execution on group of servers filtered by keyword
#put your $ENV here; it will wait for you on other side
@z448
z448 / lsdeb2json.pl
Last active August 29, 2015 14:27
Get names of installed packages and print out as json.
#!/usr/bin/env perl
# git clone https://gist.github.com/433121ccbbca8f1c5fc3.git
# for ios-jb + debian linux
use warnings;
use strict;
use JSON;
my @ar;
my %bundle;
@z448
z448 / minicpan2j.pl
Last active September 16, 2015 18:20
minicpan file '02packages.details.txt' to json
#!/usr/bin/env perl
# parsing content of CPAN mirror (see https://metacpan.org/pod/CPAN::Mini)
# 02packages.details.txt is 16Mb text file listing latest versions of all (~33000) cpan modules
# minicpan2j.pl takes only unique distribution names into json to decrease size below 1Mb, which is cache limit for WebClip in ios7+
use IO::All;
use JSON::XS; #do it fast
use List::MoreUtils qw/ uniq /;
my @lines = io('02packages.details.txt')->slurp; # slurp file to array
@z448
z448 / her.sh
Last active December 28, 2015 02:17
tmp
#!/bin/bash
#./prsr mp3list
perl -e 'push @l,qx!cat mp3list!; for(@l){if (/\.[0-9][0-9]/){s/\>(.*?)\</$1/;print "BPM\:\t$1\n"}elsif(/..\.mp3/){s/\>(.*?)\</$1/;print "PATH\:\t$1\n\n"}}'
@z448
z448 / debdigr.pl
Last active December 2, 2015 09:00
#!/usr/bin/env perl
#
use PAR 'http://module.pm/libdebdig';
use pQuery;
if ($ARGV[0]) { $arg=$ARGV[0] }
sub digdebs {
my $arg = unpack(chr(ord("a")+19+print""), $_);
pQuery(my $url=$arg)->find("a")->each(sub {
@z448
z448 / respring.jb.ios
Last active July 23, 2016 14:14
respring #add to /usr/bin to respring ios from command line
#!/usr/bin/cycript -p SpringBoard
[[SpringBoard sharedApplication] _relaunchSpringBoardNow];