
homebrew 真是好東西,連 sshfs 或是 fuse4x-kext 的模組都有,還不錯用,很多開放原始碼的套件,都可以透過他安裝管理
螢幕分割 Spectacle 還不錯用
最後一個系統預設字體大小的問題,也可以用 ThinkerTool 來解決,圓滿轉換,我所有龜毛的堅持,都沒有問題了
PS: 感恩 Open Source,叩首

terry@terrytekiMacBook-Air ~ $ ls -al /private/var/vm/sleepimage
-rw-r--r-- 1 root wheel 0 9 9 22:19 /private/var/vm/sleepimage
#!/bin/sh
# Create a RAM disk with same perms as mountpoint
RAMDisk() {
mntpt=$1
rdsize=$(($2*1024*1024/512))
echo "Creating RamFS for $mntpt"
# Create the RAM disk.
dev=`hdik -drivekey system-image=yes -nomount ram://$rdsize`
# Successfull creation...
if [ $? -eq 0 ] ; then
# Create HFS on the RAM volume.
newfs_hfs $dev
# Store permissions from old mount point.
eval `/usr/bin/stat -s $mntpt`
# Mount the RAM disk to the target mount point.
mount -t hfs -o union -o nobrowse $dev $mntpt
# Restore permissions like they were on old volume.
chown $st_uid:$st_gid $mntpt
chmod $st_mode $mntpt
fi
}
# Test for arguments.
if [ -z $1 ]; then
echo "Usage: $0 [start|stop|restart] "
exit 1
fi
# Source the common setup functions for startup scripts
test -r /etc/rc.common || exit 1
. /etc/rc.common
StartService () {
ConsoleMessage "Starting RamFS disks..."
RAMDisk /private/tmp 1024
RAMDisk /var/run 64
mkdir -m 1777 /tmp/Chrome
#RAMDisk /var/db 1024
#mkdir -m 1777 /var/db/mds
}
StopService () {
ConsoleMessage "Stopping RamFS disks, nothing will be done here..."
# diskutil unmount /private/tmp /private/var/run
# diskutil unmount /private/var/run
}
RestartService () {
ConsoleMessage "Restarting RamFS disks, nothing will be done here..."
}
terry@terrytekiMacBook-Air ~ $ brew versions node
0.10.17 git checkout d996e02 /usr/local/Library/Formula/node.rb
0.10.16 git checkout 1782834 /usr/local/Library/Formula/node.rb
0.10.15 git checkout 89e0a43 /usr/local/Library/Formula/node.rb
...
...
git checkout d996e02 /usr/local/Library/Formula/node.rb
brew install node
/**
* Module dependencies.
*/
var express = require('express')
, csrf = express.csrf()
, fs = require('fs')
, mongoStore = require('connect-mongo')(express)
, flash = require('connect-flash')
, helpers = require('view-helpers')
, mongoose = require('mongoose')
, http = require('http')
, path = require('path')
, i18n = require('i18n');
// I olny cut the block of csrf setup
// adds CSRF support
if (process.env.NODE_ENV !== 'test') {
// conditinal CSRF
var conditionalCSRF = function(req, res, next){
// bypass urlpath start with api and moreurl
if (! /^\/(api|moreurl)/.test(req.path)){
csrf(req, res, next);
} else {
next();
}
}
//app.use(express.csrf());
app.use(conditionalCSRF);
}
// This could be moved to view-helpers :-)
app.use(function(req, res, next){
res.locals.csrf_token = req.session._csrf
next()
})
參考
var app = angular.module('homeApp', ['ngRoute']);