- list bundle identifier of installed applications
mdfind -0 -onlyin /Applications "kMDItemKind == 'Application'" | xargs -0 mdls -name kMDItemCFBundleIdentifier -raw | tr $"\0" $'\n' | sed '/^(null)$/d' | sort
- list names of installed applications
mdfind -0 -onlyin /Applications "kMDItemKind == 'Application'" | xargs -0 mdls -name kMDItemDisplayName -raw | tr $"\0" $'\n' | sed '/^(null)$/d' | sort
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
#!/usr/bin/env bash | |
main() { | |
header | |
find "$1" \( -type f -o -type l \) -print0 | while IFS= read -r -d ''; do | |
second "$REPLY" | |
done | |
} | |
second() { |
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
apply plugin: 'java' | |
tasks.findByName(BasePlugin.UPLOAD_ARCHIVES_TASK_NAME).dependsOn LifecycleBasePlugin.CHECK_TASK_NAME | |
artifacts.add Dependency.ARCHIVES_CONFIGURATION, tasks.create('javadocJar', Jar.class, { | |
it.from it.project.tasks.withType(Javadoc.class) | |
it.group = LifecycleBasePlugin.BUILD_GROUP | |
it.classifier = 'javadoc' | |
it.description = 'Assembles a jar archive containing the Javadoc API documentation for the main source code.' | |
}) |
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
#!/usr/bin/env groovy | |
import groovy.sql.GroovyResultSet | |
import groovy.sql.Sql | |
import org.apache.commons.lang3.StringEscapeUtils | |
import java.nio.file.Paths | |
import java.util.regex.Pattern | |
// https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc | |
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 |
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
#!/usr/bin/env bash | |
set -u -x | |
app_path="$1" | |
target_dev="$2" | |
if [ ! -d "$app_path" ]; then | |
printf 'No such Application at "%s"' "$app_path" >&2 | |
exit 1 | |
fi | |
if [ ! -b "$target_dev" ]; then |
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
#!/usr/bin/env bash | |
# based on https://web.archive.org/web/20160819192900/https://developer.chrome.com/extensions/crx | |
set -e -u | |
crx="$1" | |
crx_off=0 | |
crx_len=$(stat -f %z "$crx") | |
hdr_off=$crx_off | |
hdr_len=16 | |
pub_off=$((hdr_off + hdr_len)) |
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
// !$*UTF8*$! | |
{ | |
archiveVersion = 1; | |
classes = { | |
}; | |
objectVersion = 46; | |
objects = { | |
/* Begin PBXAggregateTarget section */ | |
D41E1E0B0D8758A200F46F50 /* Plugins */ = { |
There are some interesting write-ups online regarding how to work with pbzx-encoded streams and their history:
- http://www.newosxbook.com/articles/OTA.html
- http://www.newosxbook.com/src.jl?tree=listings&file=pbzx.c
- http://www.tonymacx86.com/general-help/135458-pbzx-stream-parser.html (possibly just a reworked form of the prior - not sure on publication date order)
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
# v2 pbzx stream handler | |
# My personal writeup on the differences here: https://gist.github.com/pudquick/29fcfe09c326a9b96cf5 | |
# | |
# Pure python reimplementation of .cpio.xz content extraction from pbzx file payload originally here: | |
# http://www.tonymacx86.com/general-help/135458-pbzx-stream-parser.html | |
# | |
# Cleaned up C version (as the basis for my code) here, thanks to Pepijn Bruienne / @bruienne | |
# https://gist.github.com/bruienne/029494bbcfb358098b41 | |
import struct, sys |