Skip to content

Instantly share code, notes, and snippets.

View bitqiu's full-sized avatar
🏢
Working

Bit Qiu bitqiu

🏢
Working
View GitHub Profile
@bitqiu
bitqiu / nginx.conf
Last active August 29, 2015 14:20
nginx conf
user www www;
worker_processes auto; # 默认为auto。当设置成auto,tengine将自动启动与cpu数量相同的worker进程。
worker_cpu_affinity auto; #默认为auto,
#当设置成auto时,tengine将根据worker的数量自动配置cpu绑定位图。绑定的顺序是按CPU编号从大到小。
#如果worker数量大于cpu数量,则剩余的worker进程将按照CPU编号从大到小的顺序从编号最大的CPU开始再次绑定
error_log /home/wwwlogs/nginx_error.log crit;
@bitqiu
bitqiu / meta
Created May 12, 2015 08:31
meta
<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
<!-- 声明文档使用的字符编码 -->
<meta charset='utf-8'>
<!-- 优先使用 IE 最新版本和 Chrome -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<!-- 页面描述 -->
<meta name="description" content="不超过150个字符"/>
<!-- 页面关键词 -->
@bitqiu
bitqiu / .bowerrc
Last active November 26, 2015 02:04
gulp
{
"directory": "vendor/bower_components"
}
@bitqiu
bitqiu / Gulpfile.js
Last active August 29, 2015 14:24 — forked from JeffreyWay/Gulpfile.js
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
gulp.task('browserify', function() {
return browserify('./js/app.js')
.transform(babelify, { stage: 0 })
.bundle()
.on('error', function(e){
@bitqiu
bitqiu / sublime-settings
Last active August 29, 2015 14:25
sublime text3 material_theme
{
"always_show_minimap_viewport": true,
// "bold_folder_labels": true,
"font_face": "Monaco",
"font_options":
[
"gray_antialias"
],
"font_size": 14,
"highlight_line": true,
@bitqiu
bitqiu / formatime.php
Created August 28, 2015 02:07
formatime.php
<?php
function formatTime($secs)
{
$timeFormats = array(
array(0, '< 1 sec'),
array(2, '1 sec'),
array(59, 'secs', 1),
array(60, '1 min'),
array(3600, 'mins', 60),
array(5400, '1 hr'),
@bitqiu
bitqiu / Http.php
Created September 6, 2015 00:57
Http.php
<?php
/**
* HTTP Client
*
* @example
* <pre>
* Usage:
*
* Http::get($url, $params);
* Http::post($url, $params);
@bitqiu
bitqiu / genymotionwithplay.txt
Created October 29, 2015 02:50 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161892865 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
@bitqiu
bitqiu / demo.md
Last active November 7, 2015 01:47
前端部署

CSS部分

添加上注释,如下:

<!-- build:css css/app.min.css -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="lib/ionic/css/ionic.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- endbuild -->

直接通过注释来合并文件,注释解释: build:合并类型 合并后文件存放路径

@bitqiu
bitqiu / gitlab.conf
Created December 21, 2015 03:18
gitlab proxy nginx
upstream gitlab {
server 172.17.42.1:10080 fail_timeout=0;
}
# let gitlab deal with the redirection
server {
listen 80;
server_name git.example.com;
server_tokens off;
root /dev/null;