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 / gis-on-hadoop.dot
Created May 22, 2014 01:44
hadoop cluster
digraph gis_hadoop{
fontname="Microsoft YaHei";
fontsize=12;
splines=line;
node [shape="Mrecord", fontname="Microsoft YaHei", fontsize=10];
edge [color="#F1C40F", fontname="Microsoft YaHei", fontsize=10];
oozie [label="workflow", shape="none", image="oozie-logo.png", labelloc="b"];
@abruzzi
abruzzi / arcgis-tools.md
Last active August 29, 2015 14:01
ArcGIS Tools for Hadoop

ArcGIS Tools for hadoop 使用

ArcGIS Tools for hadoop,简称ATH(下同)由三个组件组成:几何计算包空间计算包ArcGIS桌面工具

我们这篇文档主要关注前两个。几何计算是一个独立的jar包,空间计算包是一个Hive的扩展,因此需要Hive环境才能运行。

设置环境

此处下载样例包,解压后,samples目录中为几个示例,我们此处将使用point-in-polygon-aggregation-hive。

@abruzzi
abruzzi / tech-list.md
Last active August 29, 2015 14:01
Tools that I've been working with
  1. Angular.js
  2. Require.js
  3. Protractor
  4. Grunt
  5. Karma
  6. Moco
  7. Wiremock
  8. Gatling
  9. OpenLayers
  10. Jasmine
@abruzzi
abruzzi / how-to-do-unit-tests.md
Last active August 29, 2015 14:01
单元测试测什么?

单元测试测什么?

单元测试中,最常见的错误是追溯被测试组件的所有依赖,并尝试将这些依赖实例化。一不小心就将单元测试做成了集成测试。

有依赖关系的测试

EmailClient是一个邮件客户端,这个客户端有一个接口:

var client = EmailClient(emailSender);
client.send(emailAddr, message);
@abruzzi
abruzzi / arduino-uno-s3003-servo.c
Last active August 29, 2015 14:02
Arduino Servo
/*
* Arduino pin 9 -> S3003 PWM(orange)
* Arduino 5V -> S3003 VCC(red)
* Arduino GND -> S3003 GND(brown)
*/
#include <Servo.h>
Servo servo;
import processing.serial.*;
int SIDE_LENGTH = 1000;
int ANGLE_BOUNDS = 75;
int ANGLE_STEP = 2;
int HISTORY_SIZE = 10;
int POINTS_HISTORY_SIZE = 500;
int MAX_DISTANCE = 100;
int angle;
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@abruzzi
abruzzi / products.conf
Created June 21, 2014 01:56
nginx configure
upstream products_grape_server {
server localhost:9292;
}
server {
listen 8080;
server_name _;
location / {
proxy_pass http://products_grape_server;
require 'active_record'
require 'yaml'
require 'mysql'
require 'logger'
task :default => :migrate
desc "Migrate the database through scripts in db/migrate. Target specific version with VERSION=x"
task :migrate => :environment do
ActiveRecord::Migrator.migrate('db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil )
@abruzzi
abruzzi / convert.md
Last active January 30, 2016 01:55
How to deal with image by using convert

The super tool for deal with image

convert the is one of the best tool for deal with images, here lists come of the typical usages:

resize image

$ identify original.png