Skip to content

Instantly share code, notes, and snippets.

taniguchi.takanori@O-13660-MAC:/tmp[3057]% cat a.sh
#!/bin/bash
function hoge(){
local i
i="I am local"
g="I am global"
}
taniguchi.takanori@O-13660-MAC:/tmp[3058]% cat b.sh
@taniguti
taniguti / error.log
Created August 28, 2018 14:37
/Users/calendarserver/CalendarServer/logs/error.log
2018-08-28T23:36:56+0900 [memcached-Default] [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
2018-08-28T23:36:56+0900 [memcached-Default] [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
2018-08-28T23:36:56+0900 [memcached-Default] [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
2018-08-28T23:36:56+0900 [memcached-Default] [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
2018-08-28T23:36:56+0900 [memcached-Default] [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
2018-08-28T23:36:57+0900 [txdav.base.datastore.subpostgres#critical] Can't start or connect to postgres: No module named Foundation
2018-08-28T23:36:57+0900 [memcached-Default] Signal handled: Terminated: 15.
create calendarserver
sudo enable for calendarserver
sudo -iu calendarserver
git clone https://github.com/apple/ccs-calendarserver.git
echo "source CalendarServer/environment.sh" > .profile
cd ccs-calendarserver
export USE_OPENSSL=1
sudo ./bin/package /Users/calendarserver/CalendarServer
@taniguti
taniguti / postinstall.diff
Last active May 13, 2018 02:34
grep -o 'OS X [0-9]\+.[0-9]\+' won't work for macOS 10.12 or later.
--- a/postinstall 2018-05-13 10:16:39.000000000 +0900
+++ b/postinstall 2018-05-13 11:33:10.000000000 +0900
@@ -1,14 +1,12 @@
#!/bin/sh
####################################################
-## Use the legacy binary if running on < 10.7
+## Use the legacy binary if running on < 10.9
####################################################
-os_version=$(system_profiler SPSoftwareDataType -xml | grep -A 2 'os_version</key>' | grep -o 'OS X [0-9]\+.[0-9]\+' | grep -o '[0-9]\+.[0-9]\+')