Skip to content

Instantly share code, notes, and snippets.

PROMPT="%W %* %n@%m:%~%# "
autoload -Uz compinit
compinit
@acoomans
acoomans / llvm.md
Last active December 3, 2019 16:11
LLVM / Clang Development Notes & Cheatsheet
#!/usr/bin/env bash
# https://secure.phabricator.com/book/phabricator/article/arcanist_quick_start/
mkdir arcanist
cd arcanist
git clone --depth 1 https://github.com/phacility/libphutil.git
git clone --depth 1 https://github.com/phacility/arcanist.git
#!/usr/bin/env bash
if ! [ -x "$(command -v cmake)" ]; then
brew install cmake || \
echo 'cmake not found'
fi
if ! [ -x "$(command -v ninja)" ]; then
brew install ninja || \
echo 'ninja not found'
#!/usr/bin/env bash
# https://webkit.org/getting-the-code/
git clone --depth 1 git://git.webkit.org/WebKit.git
cd WebKit
Tools/Scripts/webkit-patch setup-git-clone
# https://webkit.org/building-webkit/
#!/usr/bin/env bash
GIT_CLONE_ARGS="--depth 1"
## LLVM
# http://llvm.org/docs/GettingStarted.html#git-mirror
git clone $GIT_CLONE_ARGS https://git.llvm.org/git/llvm.git
git -C llvm remote add acoomans [email protected]:acoomans/llvm.git
git -C llvm config branch.master.rebase true
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
#!/bin/bash
UUID_REGEX='s/^.*\([0-9A-Z]\{8\}-[0-9A-Z]\{4\}-[0-9A-Z]\{4\}-[0-9A-Z]\{4\}-[0-9A-Z]\{12\}\).*$/\1/p'
xcrun simctl shutdown all
xcrun simctl delete unavailable
xcrun simctl list devices | sed -n $UUID_REGEX | xargs -I {} xcrun simctl erase "{}"
xcrun simctl list devices | sed -n $UUID_REGEX | xargs -I {} xcrun simctl delete "{}"
rm -fr "$HOME"/Library/Developer/CoreSimulator/Devices/*
# .gitignore for Xcode projects
.DS_Store
.Trashes
*.swp
*.lock
*~.nib
DerivedData/
@acoomans
acoomans / pypi.md
Last active September 3, 2015 18:58
Publishing to PyPI

Publishing to PyPI

  1. increment version in setup.py, commit and tag

  2. test

     python setup.py develop
     python setup.py test
    
  3. login on PyPi