Skip to content

Instantly share code, notes, and snippets.

View summerblue's full-sized avatar

Summer summerblue

View GitHub Profile

XCode

  • Install XCode from App Store.
  • Open XCode and agree to terms and conditions.

XCode CLI Tools

  • xcode-select --install

Install Homebrew

# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files
// 找捷運台北車站附近距離2公里內的捷運站
db.lbs_test.aggregate(
{
$geoNear : {
near : [25.046084,121.517542],
distanceField : "dist",
maxDistance : 2 / 111.12
}
}
);
// 找捷運台北車站附近距離2公里內的捷運站、依照建立時間做排序
db.lbs_test.aggregate(
{
$geoNear : {
near : [25.046084,121.517542],
distanceField : "dist",
maxDistance : 2 / 111.12
}
},
{
// 找捷運台北車站附近距離2公里內的捷運站、依照建立時間做排序、找前3筆資料
db.lbs_test.aggregate(
{
$geoNear : {
near : [25.046084,121.517542],
distanceField : "dist",
maxDistance : 2 / 111.12
}
},
{
// 找捷運台北車站附近距離2公里內的捷運站、依照建立時間做排序、找第4、5、6筆的資料
db.lbs_test.aggregate(
{
$geoNear : {
near : [25.046084,121.517542],
distanceField : "dist",
maxDistance : 2 / 111.12
}
},
{
@summerblue
summerblue / nginx.conf
Last active August 29, 2015 14:08 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@summerblue
summerblue / .vimrc
Last active December 28, 2015 09:19 — forked from JeffreyWay/.vimrc
set nocompatible " 去掉兼容性, 使用新的 vim 的功能
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15

Laravel Cheat-Sheet

Common usage

View::share('user', $user); Makes $user available to all views.

URI::segment(1); First segement uf an URL (eg. site.com/de/hello = de).