Mountain Lion (10.8) has three main difference compared to Lion (10.7):
- XCode 4.4 does not install Command Line Tools by default
- X11 isn't available anymore
- The installed version of OpenSSL has some bugs
#!/bin/sh | |
set -e | |
set -o pipefail | |
# collect arguments to forward on | |
while [[ "$#" > 0 ]]; do case $1 in | |
# example to save value | |
# -v|--data-volume) shift; dataVolume=$1;; # --data-volume someval | |
*) args[${#args[@]}]=$1;; | |
esac; shift; done |
MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
cd "$MY_DIR" | |
cd ../ # normalize to a known working directory could be ../../ |
(function(self){ | |
if (self.Promise) return | |
// Implements https://promisesaplus.com | |
function isFunction(fn) { | |
return typeof fn == 'function' | |
} | |
// Values that should never be checked for presence of a `then` method | |
function simpleValue(fn) { |
function isUser (auth, userKey) { | |
return auth.uid == userKey; | |
} | |
function isAdmin (auth) { | |
return root.child('users').child(auth.uid).child('isAdmin').val() == true; | |
} | |
path /users/{uid} { | |
read() { isUser(auth, uid) || isAdmin(auth) } |
#!/usr/bin/ruby | |
# | |
# This script fixes /usr/local only. | |
# | |
# 6th January 2010: | |
# Modified the script to just fix, rather than install. - rpavlik | |
# | |
# 30th March 2010: | |
# Added a check to make sure user is in the staff group. This was a problem | |
# for me, and I think it was due to me migrating my account over several |
Objective:
match can
match man
match fan
skip dan
skip ran
skip pan
Asynchronicity is the price to pay, you better know what you're paying for...
Let's share some vocabulary first:
Thread: The primitive responsible of executing code on the processor, you can give an existing (or a new) Thread some code, and it will execute it. Normally you can have a few hundreds on a JVM, arguments that you can tweak your way out to thousands. Worth noting that multitasking is achieved when using multiple Threads. Multiple Threads can exist for a single processor in which case multitasking happens when this processor switches between threads, called context switching, which will give the impression of things happenning in parallel. An example of a direct, and probably naive, use of a new Thread in Java:
public class MyRunnable implements Runnable {
public void run(){
System.out.println("MyRunnable running");
// filename: lib/dev.js | |
const webpackDevMiddleware = require('webpack-dev-middleware'); | |
const webpackHotMiddleware = require('webpack-hot-middleware'); | |
const webpack = require('webpack'); | |
// expects to live in ./lib | |
const config = Object.assign({}, require('../webpack.config.dev'), { | |
// customisations that were typically off, but I could turn on during experiments | |
}); |
git submodule foreach '[ "$path" == "submodule-to-exclude" ] || git pull origin master' |