Skip to content

Instantly share code, notes, and snippets.

View xiaohuilam's full-sized avatar
🧸
Sleeping

Bruce Lam xiaohuilam

🧸
Sleeping
  • Keymatic Inc
  • Chongqing, China
  • 10:06 (UTC +08:00)
View GitHub Profile
(function() {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://cdn.jsdelivr.net/npm/eruda";
script.onload = function() {
eruda.init()
}
document.body.appendChild(script);
})();
@xiaohuilam
xiaohuilam / _git_hooks_pre-commit
Last active August 24, 2018 03:03
phpcs when git commit
#!/bin/sh
list=$(git status -s | awk '{ print $2}')
for i in $list
do
/usr/local/bin/phpcs $i --report=source,diff,code
done
@xiaohuilam
xiaohuilam / install.sh
Created August 21, 2018 08:04
VSCODE微信小程序补全
curl 'http://git.io/minapp.ts' >> '/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/lib.dom.d.ts'
@xiaohuilam
xiaohuilam / vscode-wxapp.d.ts
Last active August 21, 2018 08:05
VSCODE微信小程序补全
// 微信小程序补全开始
declare namespace wx {
namespace request {
type Param = {
/**
* 开发者服务器接口地址
*/
url: string
/**
@xiaohuilam
xiaohuilam / _ide_helper.php
Created August 2, 2018 11:14
better laravel ide_helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.3.31 on 2018-07-31 15:31:16.
*
* This file should not be included in your code, only analyzed by your IDE!
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
@xiaohuilam
xiaohuilam / src_Indexer.php
Last active April 20, 2018 01:08
Improve your php felixfbecker/language-server index speed
From 8977c95db6b98caa9a69d067026e4fc869a6ff7d Mon Sep 17 00:00:00 2001
From: Xiaohui Lam <xiaohui.lam@e.hexdata.cn>
Date: Sun, 18 Mar 2018 00:16:22 +0800
Subject: [PATCH] make dependencies not released be able to cache
---
src/Indexer.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/Indexer.php b/src/Indexer.php
@xiaohuilam
xiaohuilam / style.css
Created May 3, 2016 15:38
input[type="number"] disable arrow
input[type='number'] {
-moz-appearance: textfield
}
input::-webkit-outer-spin-button,input::-webkit-inner-spin-button {
-webkit-appearance: none
}
@xiaohuilam
xiaohuilam / bootstrap3-select-no-radius.css
Created April 25, 2016 01:52
input[type="select"] elements in Bootstrap 3 removing border-radius hack
select.form-control, select.form-control:hover, select.form-control:focus, select.form-control:active {
line-height: normal;
outline: 1px solid #D1D1D1;
outline-offset: -1px;
border: 0;
box-shadow: inset 0 2px 1px rgba(0,0,0,.075);
}
@xiaohuilam
xiaohuilam / nginx.conf
Created August 3, 2015 15:11
nginx better proxy cache configuration
map $uri $store_uri {
default $uri;
'' '/index.html';
'/' '/index.html';
}
server {
listen 443 ssl spdy;
server_name www.it68.com.cn;
ssl on;