- Install XCode from App Store.
- Open XCode and agree to terms and conditions.
xcode-select --install
| <?php | |
| use Illuminate\Foundation\Testing\WithoutMiddleware; | |
| use Illuminate\Foundation\Testing\DatabaseTransactions; | |
| class PoostApiTest extends TestCase | |
| { | |
| use MakePoostTrait, ApiTestTrait, WithoutMiddleware, DatabaseTransactions; | |
| /** |
| # Built application files | |
| /*/build/ | |
| # Crashlytics configuations | |
| com_crashlytics_export_strings.xml | |
| # Local configuration file (sdk path, etc) | |
| local.properties | |
| # Gradle generated files |
backup-manager is an excelent package, but lack of auto naming feature, here is a workaround using Laravel's Artisan command line tool.
This is the command what we are going to accomplish:
| # Clean, simple, compatible and meaningful. | |
| # Tested on Linux, Unix and Windows under ANSI colors. | |
| # It is recommended to use with a dark background and the font Inconsolata. | |
| # Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
| # | |
| # http://ysmood.org/wp/2013/03/my-ys-terminal-theme/ | |
| # Mar 2013 ys | |
| # Machine name. | |
| function box_name { |
| // 找捷運台北車站附近距離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 | |
| } | |
| }, | |
| { |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |