Download SVG country flags and css, then convert the codes from the iso 3166 two character codes to three character codes.
./get_flags.sh
Then copy the flag-icon.css
file into public/css
and the flags
directory to public/
.
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.circle { | |
fill: steelblue; | |
stroke: '#fff'; | |
} | |
</style> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.circle { | |
fill: steelblue; | |
stroke: '#fff'; | |
} | |
.label { | |
fill: #777; | |
} |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.circle { | |
fill: steelblue; | |
stroke: '#fff'; | |
} | |
.label { | |
fill: #777; | |
} |
/* globals require, console, process, setInterval */ | |
'use strict'; | |
var async = require('async') | |
, redis = require('redis') | |
, client = redis.createClient(); | |
client.on('error', function(err) { | |
console.error(err); | |
}); |
#!/bin/sh | |
# | |
# Send git commit notifications to [notifo](http://notifo.com/) | |
# read the commands from stdin in the git hook | |
read oldrev newrev refname | |
# name of the repository | |
REPO="GIT REPOSITORY NAME" |
#!/bin/sh | |
# | |
# A git pre-commit hook for node.js projects to | |
# * lint JavaScript files with [jshint](https://github.com/jshint/jshint/) | |
# * run [mocha](http://visionmedia.github.com/mocha/) tests from npm, as defined in package.json | |
# * build docs (e.g. using docco or markdox), as defined in package.json | |
# | |
# package.json should have a scripts block that defines how to run tests and build docs: | |
# "scripts" : { | |
# "test": "./node_modules/mocha/bin/mocha -R spec" |
#!/bin/bash | |
# useful for [geektool](http://projects.tynsoe.org/en/geektool/) | |
# jg: made lib_dir generic | |
# Title: Things Extract Script for GeekTool | |
# Author: Alex Wasserman | |
# Description: Extracts the currents items from Things database, stores in a temp file. Outputs tmp file if Things DB is locked in use. | |
# Things SQL Library | |
export SQL_LIBRARY="ThingsLibrary.db" |
-include .env | |
PROJECTNAME := $(shell basename "$(PWD)") | |
GO ?= go | |
GOBUILD := $(GO) build | |
GOARCH := amd64 | |
BIN_DIR := ./bin | |
GOFILES := $(shell find . -name "*.go") |
This is a sample of how to send some information to logstash via the TCP input in nodejs or python. It assumes the logstash host is on 10.10.10.100 and the TCP listening input is 9563.
The logstash.conf should look something like the sample file.
The log message should be a stringified JSON object with the log message in the @message field.
To use, run the node script node sendMessageToLogstash.js
, or the python script python sendMessageToLogstash.js