This file contains 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
xcode-select --install | |
if [ ! -x /opt/homebrew/bin/brew ]; then | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
fi | |
brew tap 'homebrew/bundle' | |
brew tap 'homebrew/services' | |
brew install automake clang-format cmake icu4c libressl libxml2 openssl pkg-config readline sqlite yajl |
This file contains 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 | |
if [ "$1" = "--stop" ] | |
then | |
git config --unset-all cowork.author | |
elif [ -n "$1" ] | |
then | |
author=$(git log --no-merges --author "$1" -1 --pretty="%an <%ae>") | |
if [ -n "$author" ] | |
then |
This file contains 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
(function() { | |
function status(response) { | |
if (response.ok) { | |
return response | |
} else { | |
var error = new Error(response.statusText || response.status) | |
error.response = response | |
throw error | |
} | |
} |
This file contains 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
require "minitest/autorun" | |
class RangeSet | |
include Enumerable | |
def initialize(ranges = []) | |
@ranges = merge(ranges) | |
end | |
def <<(range) |
This file contains 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
git clone https://github.com/sstephenson/ruby-build.git | |
cd ruby-build | |
sudo ./install.sh | |
sudo ruby-build 2.0.0-p247 /usr/local | |
cd .. && rm -rf ruby-build |
This file contains 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
(function() { | |
function createNode(text) { | |
var node = document.createElement('pre'); | |
node.style.width = '1px'; | |
node.style.height = '1px'; | |
node.style.position = 'fixed'; | |
node.style.top = '5px'; | |
node.textContent = text; | |
return node; | |
} |
This file contains 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
// $ traceur --experimental --out template-es6.js template.js | |
function escape(text) { | |
let el = document.createElement('p') | |
el.textContent = text | |
return el.innerHTML | |
} | |
function node(html) { | |
let parser = new DOMParser() |
This file contains 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
// Compile without optimizations: | |
// cc -S -O0 -masm=intel const-expr.c | |
// Compile with optimizations: | |
// cc -S -O3 -masm=intel const-expr.c | |
int main() { | |
int x = 11; | |
int y = 12; | |
int z = x + y; | |
return z; | |
} |
This file contains 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
#include <stdio.h> | |
#define MAX 100000000 | |
int calculate() { | |
int sum = 0; | |
for (int i = 0; i < 10; i++) { | |
sum += i; | |
} | |
return sum; |
This file contains 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
if [ $# -ne 1 ]; then | |
echo "Usage: make-icns icon.png" | |
exit 1 | |
fi | |
IMAGE=$1 | |
OUT=`basename ${IMAGE%\.*}`.iconset | |
mkdir $OUT | |
sizes=(16 32 128 256 512) |
NewerOlder