This file contains hidden or 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
# unpkg | |
# Usage: unpkg xxx.pkg | |
unpkg() { | |
filepath=$(dirname -- "$1") | |
filename=$(basename -- "$1") | |
input="$filepath/$filename" | |
output="$filepath/${filename%.*}" | |
pkgutil --expand $input $output | |
find $output -type f -name 'Payload' -exec tar -xf {} -C $filepath \; | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>URL</key> | |
<string>vnc://username:password@location</string> | |
<key>restorationAttributes</key> | |
<dict> | |
<key>autoClipboard</key> | |
<true/> |
This file contains hidden or 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
var data = document.querySelectorAll(".infinite-scroll-component .row"); | |
var output = "Device ID Device Name\n" | |
for (var i = 1; i < data.length; i++) { | |
let identifier = data[i].childNodes[1].childNodes[0].textContent; | |
let name = data[i].childNodes[0].childNodes[0].textContent; | |
output += [identifier, name].join(" ") + "\n"; | |
} | |
console.log(output); |
This file contains hidden or 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 | |
PASSWORD="$2" | |
DOMAIN="$3" | |
IP="$4" | |
PARTS=$(echo $DOMAIN | awk 'BEGIN{FS="."} {print NF?NF-1:0}') | |
# If $DOMAIN has two parts (domain + tld), use wildcard for host | |
if [[ $PARTS == 1 ]]; then | |
HOST='@' |
This file contains hidden or 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 | |
# @raycast.schemaVersion 1 | |
# @raycast.title Swap IP | |
# @raycast.icon 🔢 | |
# @raycast.mode fullOutput | |
# @raycast.argument1 { "type": "text", "placeholder": "IP Value" } | |
if [[ $1 =~ ^-?[0-9]+$ ]] ; then | |
echo $((($1 >> 24) & 0xFF)).$((($1 >> 16) & 0xFF)).$((($1 >> 8) & 0xFF)).$(($1 & 0xFF)) |
This file contains hidden or 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/osascript | |
# @raycast.schemaVersion 1 | |
# @raycast.title Clear Downloads | |
# @raycast.icon 🚮 | |
# @raycast.mode silent | |
tell application "Finder" | |
set targets to every item of folder (path to downloads folder as text) | |
delete targets |
This file contains hidden or 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 python | |
# Client and server for udp (datagram) echo. | |
# | |
# Usage: udpecho -s [port] (to start a server) | |
# or: udpecho -c host [port] <file (client) | |
import sys | |
from socket import * |
This file contains hidden or 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/sh | |
export SRC="$(pwd)/iperf" | |
export DST="$(pwd)/iperf.builds" | |
export XCODE_DIR="$(xcode-select -p)" | |
echo "Checking out iperf..." | |
git clone https://github.com/esnet/iperf.git --depth 1 --branch 3.13 | |
echo "Building for macOS..." |
This file contains hidden or 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 | |
# shellcheck disable=2016,2043,2044,2046,2086 | |
VERSION="4.33" | |
SRC=$(pwd)/libev | |
DST=$(pwd)/libev.builds | |
PLATFORMS="macosx iphoneos iphonesimulator appletvos appletvsimulator xros xrsimulator" | |
set -e |
This file contains hidden or 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 | |
# shellcheck disable=2016,2046,SC2086 | |
VERSION="20220613" | |
SRC=$(pwd)/boringssl | |
DST=$(pwd)/boringssl.builds | |
PLATFORMS="macosx iphoneos iphonesimulator appletvos appletvsimulator xros xrsimulator" | |
set -e |
OlderNewer