Skip to content

Instantly share code, notes, and snippets.

View abruzzi's full-sized avatar
⌨️
Writing a React book - React Anti-Patterns

Juntao Qiu abruzzi

⌨️
Writing a React book - React Anti-Patterns
View GitHub Profile
@abruzzi
abruzzi / gunplot-apachebench
Last active April 28, 2017 18:35
调整前端服务器性能的一些配置方法
# Where to place the legend/key
set key left top
# Draw gridlines oriented on the y axis
set grid y
# Specify that the x-series data is time data
set xdata time
# Specify the *input* format of the time data

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@abruzzi
abruzzi / how-to-publish-package.md
Created February 23, 2014 01:22
如何发布你的开源软件包(npm && gem)

NPM

  1. 创建npm账户,如果没有的话
  2. 定义package.json
  3. 本地开发测试
  4. npm pack 成本地宝测试
  5. npm publish .

命令npm pack可以将你的包打包成一个本地的tgz文件:

@abruzzi
abruzzi / fix-jasmine-jquery-bug.md
Last active August 29, 2015 13:56
Fix Jamine-jquery fixtures bug in karma

Put this to karma.conf.js

{
    // list of files / patterns to load in the browser
    files: [
        {pattern: 'scripts/**/*.js', included: false},
        {pattern: 'scripts/**/*.html', served: true, included: false},
        {pattern: 'tests/**/*.js', included: false}
 ]
@abruzzi
abruzzi / moco.conf.json
Last active August 29, 2015 13:56
Project using moko and nginx
[
{
"mount": {
"dir": "./",
"uri": "/"
}
},
{
"request": {
"method": "post",
@abruzzi
abruzzi / jshintrc.json
Created February 27, 2014 01:24
A simple jshint rc
{
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"indent": 4,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": true,
@abruzzi
abruzzi / deploy-your-static-app.md
Created March 5, 2014 05:33
How to deploy your static application

Tools

  1. Middleman, static page generator
  2. Foundation 5, responsive web page css
  3. Github page, the awesome static page hosting
gem install middleman
@abruzzi
abruzzi / google-bookmarks.md
Created March 7, 2014 07:40
visualize your data

Download you google bookmarks to file, in HTML format.

open it in browser, you need jQuery of course:

var jq = document.createElement('script');
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
package jmeter
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.http.Headers.Names._
import bootstrap._
class JMeterBenchmark extends Simulation {
val httpConf = httpConfig
@abruzzi
abruzzi / gis-stack.dot
Created April 11, 2014 02:50
setup your own map server
digraph gis_stack{
fontname="Microsoft YaHei";
fontsize=12;
rankdir=LR;
node [shape="Mrecord", fontname="Microsoft YaHei", fontsize=10];
edge [color="#F1C40F", fontname="Microsoft YaHei", fontsize=10];
openlayers [shape="none", image="OpenLayers.trac.png", label=""];
leaflet [shape="none", image="leaflet-logo.png", label=""];