Skip to content

Instantly share code, notes, and snippets.

View blmoore's full-sized avatar
🙆‍♂️

Benjamin L. Moore blmoore

🙆‍♂️
View GitHub Profile
#!/usr/bin/env bash
function __tc_encode {
# Only unicode characters are not supported
echo -n "$1" | sed "s/\([|']\)/\|\1/g; s/\[/\|\[/g; s/\]/\|\]/g; s/\r/\|r/g;" | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/|n/g'
}
function __tc_message {
echo "##teamcity[message text='$(__tc_encode "$2")' status='${1:-NORMAL}']"
}
function __tc_simple {
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='//code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script>
<script src='//code.highcharts.com/highcharts.js' type='text/javascript'></script>
<script src='//code.highcharts.com/highcharts-more.js"' type='text/javascript'></script>
<script src='//code.highcharts.com/modules/exporting.js' type='text/javascript'></script>
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='//d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='//dimplejs.org/dist/dimple.v2.1.0.min.js' type='text/javascript'></script>
<style>
.rChart {
@blmoore
blmoore / edinbr_header.R
Created November 16, 2014 16:37
Generates header image for http://edinbr.org
################################################
# Generates header image for http://edinbr.org #
################################################
library("ggmap")
library("ggplot2")
# grab postcode data
# wget http://www.freemaptools.com/download/full-postcodes/postcodes.zip && unzip
pc <- read.csv("postcodes.csv",
header=T, sep=",", stringsAsFactors=F)
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='//d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='//dimplejs.org/dist/dimple.v2.1.0.min.js' type='text/javascript'></script>
<style>
.rChart {
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='//d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='//dimplejs.org/dist/dimple.v2.1.0.min.js' type='text/javascript'></script>
<style>
.rChart {
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='//d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='//dimplejs.org/dist/dimple.v2.1.0.min.js' type='text/javascript'></script>
<style>
.rChart {
@blmoore
blmoore / index.html
Last active August 29, 2015 14:06
The top 50 science stars of Twitter
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://dimplejs.org/dist/dimple.v1.1.1.min.js' type='text/javascript'></script>
<style>
.rChart {
@blmoore
blmoore / index.html
Last active August 29, 2015 14:02
testing js plot
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://dimplejs.org/dist/dimple.v1.1.1.min.js' type='text/javascript'></script>
<style>
.rChart {
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://nvd3.org/assets/css/nv.d3.css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://timelyportfolio.github.io/rCharts_nvd3_tests/libraries/widgets/nvd3/js/nv.d3.min-new.js' type='text/javascript'></script>
<script src='http://nvd3.org/assets/lib/fisheye.js' type='text/javascript'></script>