Skip to content

Instantly share code, notes, and snippets.

View sunnyyoung's full-sized avatar

Sunny Young sunnyyoung

View GitHub Profile
$VERSION="20220613"
$SRC="$PWD\boringssl"
$DST="$PWD\boringssl.builds"
$PLATFORMS="win32", "x64"
Write-Output "Checking out boringssl..."
git clone https://boringssl.googlesource.com/boringssl --depth 1 --branch fips-$VERSION
Write-Output "Patching boringssl..."
#!/bin/bash
# shellcheck disable=2016,2046,SC2086
SRC=$(pwd)/libuv
DST=$(pwd)/libuv.builds
PLATFORMS="macosx iphoneos iphonesimulator appletvos appletvsimulator xros xrsimulator"
set -e
echo "Checking out libuv..."
#!/bin/bash
# shellcheck disable=SC2016,SC2046,SC2086
VERSION="3.6.0"
SRC=$(pwd)/mbedtls
DST=$(pwd)/mbedtls.builds
PLATFORMS="macosx iphoneos iphonesimulator appletvos appletvsimulator xros xrsimulator"
set -e
@sunnyyoung
sunnyyoung / build-fping.sh
Created July 3, 2023 06:29
A macOS/iOS universal fping binary building script.
#!/bin/sh
# shellcheck disable=SC2044,SC2046,SC2086,SC3009
SRC=$(pwd)/fping-5.1
DST=$(pwd)/fping.builds
XCODE_DIR=$(xcode-select -p)
echo "Downloading fping..."
curl -s -L https://github.com/schweikert/fping/releases/download/v5.1/fping-5.1.tar.gz | tar xz
@sunnyyoung
sunnyyoung / cloudflare_ddns.sh
Created June 15, 2023 01:55
Synology cloudflare DDNS provider script
#!/bin/bash
set -e;
ipv4Regex="((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
ttl=60
proxy="false"
# DSM Config
username="$1"
#!/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
#!/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
@sunnyyoung
sunnyyoung / build-iperf.sh
Created March 24, 2023 05:04
A macOS/iOS universal iperf3 binary building script.
#!/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..."
@sunnyyoung
sunnyyoung / echo.py
Created August 13, 2022 05:15
Minimal UDP echo tool.
#! /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 *
@sunnyyoung
sunnyyoung / clear-downloads.sh
Created August 10, 2022 02:44
Raycast script command: Move all items from Donwloads to Trash.
#!/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