Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.
####1. anchor file
Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:
| #!/bin/sh | |
| # | |
| # ghost - this script starts the ghost blogging package | |
| # | |
| # chkconfig: - 95 20 | |
| # description: ghost is a blogging platform built using javascript \ | |
| # and running on nodejs | |
| # | |
| # Source function library. |
Original: "Callbacks are imperative, promises are functional: Node's biggest missed opportunity" by James Coglan
Translated by Yuta Okamoto (@okapies)
| /** | |
| * Add dataset support to elements | |
| * No globals, no overriding prototype with non-standard methods, | |
| * handles CamelCase properly, attempts to use standard | |
| * Object.defineProperty() (and Function bind()) methods, | |
| * falls back to native implementation when existing | |
| * Inspired by http://code.eligrey.com/html5/dataset/ | |
| * (via https://github.com/adalgiso/html5-dataset/blob/master/html5-dataset.js ) | |
| * Depends on Function.bind and Object.defineProperty/Object.getOwnPropertyDescriptor (polyfills below) | |
| * All code below is Licensed under the X11/MIT License |
| 原文: | http://www.sdtimes.com/link/36534 |
|---|---|
| 著者: | Larry O'Brien |
僕は関数型プログラミングが好きだ。次の10年にかけてコードの革命を起こしていくだろうと考えている:言語はより関数型の機能を採用していくだろうし、開発者はより関数型の技術を導入していくだろうし、いくつかの点では、関数型プログラミングの原則はコードを組み立てていく上で「自然で」もっとも明確なやり方だとみんな考えるようになっていくだろう。
だけど、僕はもうこのシナリオを本気にしちゃいない。関数型プログラミングは、ワクワクするものを学ぶことに興味があると言っている主流のプログラマにとって明白な、大きな問題を抱えている:関数型プログラマーは自惚れ野郎どもだってことだ。
| import org.json.JSONArray; | |
| import org.json.JSONException; | |
| import org.json.JSONObject; | |
| import java.util.*; | |
| public class JsonHelper { | |
| public static Object toJSON(Object object) throws JSONException { | |
| if (object instanceof Map) { | |
| JSONObject json = new JSONObject(); |
| /* OAuthSimple | |
| * A simpler version of OAuth | |
| * | |
| * author: jr conlin | |
| * mail: [email protected] | |
| * copyright: unitedHeroes.net | |
| * version: 1.2 | |
| * url: http://unitedHeroes.net/OAuthSimple | |
| * | |
| * Copyright (c) 2011, unitedHeroes.net |