Skip to content

Instantly share code, notes, and snippets.

Summer summerblue

Block or report user

Report or block summerblue

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:81adad02997b2860bf2e1b0b3359b8d3

XCode

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

XCode CLI Tools

  • xcode-select --install

Install Homebrew

View Android Studio .gitignore
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files
View mongodb_aggregation_lbs_search.js
// 找捷運台北車站附近距離2公里內的捷運站
db.lbs_test.aggregate(
{
$geoNear : {
near : [25.046084,121.517542],
distanceField : "dist",
maxDistance : 2 / 111.12
}
}
);
View mongodb_aggregation_lbs_search_orderby_time.js
// 找捷運台北車站附近距離2公里內的捷運站、依照建立時間做排序
db.lbs_test.aggregate(
{
$geoNear : {
near : [25.046084,121.517542],
distanceField : "dist",
maxDistance : 2 / 111.12
}
},
{
View mongodb_aggregation_lbs_search_orderby_time_limit3.js
// 找捷運台北車站附近距離2公里內的捷運站、依照建立時間做排序、找前3筆資料
db.lbs_test.aggregate(
{
$geoNear : {
near : [25.046084,121.517542],
distanceField : "dist",
maxDistance : 2 / 111.12
}
},
{
View mongodb_aggregation_lbs_search_orderby_time_limit3_offset3.js
// 找捷運台北車站附近距離2公里內的捷運站、依照建立時間做排序、找第4、5、6筆的資料
db.lbs_test.aggregate(
{
$geoNear : {
near : [25.046084,121.517542],
distanceField : "dist",
maxDistance : 2 / 111.12
}
},
{
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
View static_server.js
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);
View .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
View laravel-cheat-sheet.md

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).

You can’t perform that action at this time.