Skip to content

Instantly share code, notes, and snippets.

View playerjamesbattleground's full-sized avatar

james jiang playerjamesbattleground

View GitHub Profile
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gordondickens.sample</groupId>
<artifactId>sample-parent</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>

A demo of the d3.geo.tile plugin, which determines which 256x256 tiles are visible in the viewport based on a scale and translate. This demo combines the tile plugin with d3.behavior.zoom for panning and zooming, resulting in a a simple slippy map. Based partly on an example by Tom MacWright.

#!/bin/bash
# The current process has unrestricted/unlimited (root) access when the Effective User ID (EUID) is 0:
if [[ $EUID -ne 0 ]]; then
echo -e "\e[1;31mThis script must be run as root or it will fail\e[0m" 1>&2
exit 1
fi
# Make sure we are on CentOS
OS=`cat /etc/redhat-release | awk {'print $1}'`
function readDir(start, callback) {
// Use lstat to resolve symlink if we are passed a symlink
fs.lstat(start, function(err, stat) {
if(err) {
return callback(err);
}
var found = {dirs: [], files: []},
total = 0,
processed = 0;
function isDir(abspath) {
@playerjamesbattleground
playerjamesbattleground / ant task1
Last active August 29, 2015 13:56
ant copy from template and replace
//In ant build, assume properties were valued elsewhere
<copy file="${business.service.op.template}" tofile="${business.src.main.app.dir}/${business.op.name.lowercase}-stub.xml">
<filterset>
<filter token="business.op.name.capitalcase" value="${business.op.name.capitalcase}" />
<filter token="business.op.name.lowercase" value="${business.op.name.lowercase}" />
</filterset>
</copy>
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
<flow name="@service.op.name.capitalcase@JMSHandler" doc:name="@service.op.name.capitalcase@JMSHandler">
<logger message="#[message.payload]" level="WARN"category="@service.op.name.lowercase@.JMSHandler.Response" doc:name ="Log@service.op.name.lowercase@ Service Response" />
//rest of actual flow content with placeholders