Skip to content

Instantly share code, notes, and snippets.

View summerblue's full-sized avatar

Summer summerblue

View GitHub Profile
{
"id": "1408631499.2148.1282148919",
"version": 1,
"time": 1408631498.8228,
"method": "GET",
"uri": "/",
"headers": {
"content-type": [
""
],
@summerblue
summerblue / PoostApiTest.php
Created December 13, 2017 11:12
InfyOmLabs/laravel-generator 生成的测试 API 代码
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class PoostApiTest extends TestCase
{
use MakePoostTrait, ApiTestTrait, WithoutMiddleware, DatabaseTransactions;
/**
@summerblue
summerblue / gist:e34f1c79e100c5deac20
Last active April 23, 2017 12:46
Using Artisan for backup-manager Auto naming convenience

Introduction

backup-manager is an excelent package, but lack of auto naming feature, here is a workaround using Laravel's Artisan command line tool.

Creating the command

This is the command what we are going to accomplish:

XCode

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

XCode CLI Tools

  • xcode-select --install

Install Homebrew

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
@summerblue
summerblue / gist:7277121
Created November 2, 2013 09:24
nginx php-fpm
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
中文输入法:
我用的是QQ五笔,但在编辑模式中输入中文时,常常会触发MacVim的命令,原因是输是输入法没有完全截获按键;
解决方法:在命令行输入以下命令,
defaults write org.vim.MacVim MMUseInlineIm 0
git clone https://github.com/fivesheep/chnroutes.git
python chnroutes.py -p mac
sudo cp ip-up /etc/ppp
sudo cp ip-down /etc/ppp
sudo chmod a+x ip-up ip-down
@summerblue
summerblue / gist:7130165
Created October 24, 2013 02:11
checkout all the remote branches
for remote in `git branch -r `; do git branch --track $remote; done
git remote update
git pull --all