Skip to content

Instantly share code, notes, and snippets.

View heroims's full-sized avatar
🤡
I may be slow to respond.

Ian heroims

🤡
I may be slow to respond.
View GitHub Profile
Safe Remove Disk:
umount /mnt/sd{N}{n}
hdparm -Y /dev/sd{N}
@heroims
heroims / gist:a43559ba3d8a7034b37ee043bfbd4dd3
Created August 31, 2017 04:14
Appstore framework auto check optim
if [ "${CONFIGURATION}" == "Release" ]; then
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
EXTRACTED_ARCHS=()
for i in `ls`;do mv $i prefix_$i;done
@heroims
heroims / gist:711322fc5b5814fb65fcebcf362ba3ce
Created August 22, 2017 03:16
mobile public html header
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="Expires" CONTENT="-1">
<meta http-equiv="Cache-Control" CONTENT="no-cache">