Skip to content

Instantly share code, notes, and snippets.

Avatar

刘兵 iflamed

View GitHub Profile
@iflamed
iflamed / index.html
Created Jul 1, 2014
A Pen by 刘兵.
View index.html
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=480px,target-densitydpi=device-dpi,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<title>中苹果</title>
</head>
<body>
<div id="card">
@iflamed
iflamed / php.conf
Last active Aug 29, 2015
one nginx server and multiple app(folder) share one fastcgi
View php.conf
##
# also you can seprate the php's fastcgi configration,then integrate to the test.example.com.conf
##
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
## NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
# With php5-cgi alone:
#fastcgi_pass 127.0.0.1:9000;
## With php5-fpm:
@iflamed
iflamed / web.config
Created Apr 2, 2015
Laravel 4 iis rewrite config
View web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
@iflamed
iflamed / com.shadowsocks.chinadns.plist
Created May 7, 2015
a plist file for mac os x launchctl damoen
View com.shadowsocks.chinadns.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.shadowsocks.chinadns</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/chinadns</string>
<string>-l</string>
@iflamed
iflamed / bs3-form.group.sublime-snippet
Created Jun 19, 2015
Bootstrap form horizontal group snippet and inline or normal group snippet
View bs3-form.group.sublime-snippet
<snippet>
<content><![CDATA[
<div class="form-group">
<label for="${1:eleid}">${2:Title}</label>
<input type="text" class="form-control" name="${1:eleid}" id="${1:eleid}" placeholder="${2:Title}">
</div>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>bs3-form:group</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@iflamed
iflamed / saas.conf
Created Jun 20, 2015
Nginx configruation with gzip and cache control
View saas.conf
server {
server_name saas.domain.com;
access_log /www/logs/saas.domain.com_access.log;
error_log /www/logs/saas.domain.com_error.log;
root /www/sites/saaspos/public;
index index.php index.html index.htm;
# Begin to gzip config
gzip on;
gzip_min_length 1k;
@iflamed
iflamed / index.html
Last active Aug 29, 2015
跳动的气泡
View index.html
<header class="img-cover launch">
<div class="tagContent">
<div class="tagContentInfo"><a href="#">Bigger</a></div>
<div class="tagAnimation">
<div class="animationContainer"><span class="black1"></span></div>
<div class="animationContainer"><span class="black2"></span></div>
<div class="animationContainer">
<span class="brand-bg"></span>
</div>
</div>
@iflamed
iflamed / beanstalkd.service
Created Sep 16, 2015
Beanstalkd Centos 7 systemctl config file
View beanstalkd.service
# beanstalkd
Beanstalkd Centos 7
http://stackoverflow.com/questions/26786368/beanstalkd-for-centos-7?answertab=active#tab-top
Yes, you can instal it via git and then copy systemd script:
**Step 0. Install git**
` yum install git `
@iflamed
iflamed / index.js
Created Sep 20, 2015
Laravel gulp webpack watch the vuejs vue file
View index.js
// this.registerWatcher('webpack', [config.assetsDir + '/**/*.js',config.assetsDir + '/**/*.vue']);
var gulp = require('gulp'),
webpack = require('gulp-webpack'),
gulpIf = require('gulp-if'),
uglify = require('gulp-uglify'),
gulpIgnore = require('gulp-ignore'),
_ = require('underscore'),
elixir = require('laravel-elixir'),
utilities = require('laravel-elixir/ingredients/commands/Utilities'),
notification = require('laravel-elixir/ingredients/commands/Notification');