Skip to content

Instantly share code, notes, and snippets.

View KeithPiTsui's full-sized avatar

Keith KeithPiTsui

  • Guangzhou
View GitHub Profile
@KeithPiTsui
KeithPiTsui / ll.bnf
Last active April 22, 2021 11:00 — forked from mewmew/ll.bnf
A BNF grammar for LLVM IR assembly
// ### [ Lexical part ] ########################################################
_ascii_letter_upper
: 'A' - 'Z'
;
_ascii_letter_lower
: 'a' - 'z'
;
@KeithPiTsui
KeithPiTsui / install_infra.sh
Created December 19, 2020 09:29 — forked from JosiahOne/install_infra.sh
Install gcc prerequisites on macOS High Sierra
###############################################################################
# Script used to download, build, and install prerequisites for gcc on macOS. #
# Run this from the srcdir/ directory. #
###############################################################################
# Make infrastucture directory
mkdir infrastucture;
# Install GMP
set -e;
@KeithPiTsui
KeithPiTsui / gist:bdca4588b6bb99d55ab3214b0f205687
Created December 19, 2020 07:35 — forked from morgant/gist:1753095
Building GnuTLS on Mac OS X

Preparing the Build Environment

cd ~/Desktop
mkdir wget-build
cd wget-build

Building & Installing GMP 5.0.2

@KeithPiTsui
KeithPiTsui / emacs26.sh
Last active April 3, 2020 05:02 — forked from Yevgnen/emacs26.sh
Compile Emacs 26 on Ubuntu 18.04
mkdir emacs
cd emacs
git init
git remote add origin https://github.com/emacs-mirror/emacs.git
git fetch --depth 1 origin emacs-26
git reset --hard FETCH_HEAD
sudo apt install autoconf make gcc texinfo libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff5-dev libgnutls28-dev libncurses5-dev
./autogen.sh
./configure
make
@KeithPiTsui
KeithPiTsui / universal-framework.sh
Created January 16, 2018 02:23 — forked from atsepkov/universal-framework.sh
This run script will build the iphoneos and iphonesimulator schemes and then combine them into a single framework using the lipo tool (including all the Swift module architectures). This version works with Cocoapods, merging simulator and device architectures for intermediate libraries as well. To use this script, go to Product > Scheme > Edit S…
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
if [ "true" == ${ALREADYINVOKED:-false} ]
then
echo "RECURSION: Detected, stopping"
else
export ALREADYINVOKED="true"
@KeithPiTsui
KeithPiTsui / universal-framework.sh
Created January 16, 2018 02:21 — forked from cromandini/universal-framework.sh
This run script will build the iphoneos and iphonesimulator schemes and then combine them into a single framework using the lipo tool (including all the Swift module architectures).
#!/bin/sh
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Step 1. Build Device and Simulator versions
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
@KeithPiTsui
KeithPiTsui / thin-frameworks.sh
Created October 31, 2017 08:40 — forked from sundeepgupta/thin-frameworks.sh
Bash script to thin fat iOS frameworks. Strips non-valid architectures from fat framework binaries.
# Adapted from https://github.com/realm/realm-cocoa/blob/master/scripts/strip-frameworks.sh
# This script strips all non-valid architectures from dynamic libraries in
# the application's `Frameworks` directory which is required for App Store submission.
#
# The following environment variables are required:
#
# BUILT_PRODUCTS_DIR
# FRAMEWORKS_FOLDER_PATH
# VALID_ARCHS