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
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8

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

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 / 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=""];