Skip to content

Instantly share code, notes, and snippets.

View chrtze's full-sized avatar
👨‍💻

Christopher Möller chrtze

👨‍💻
View GitHub Profile
@chrtze
chrtze / Hello World Carbide.carbide.md
Last active August 27, 2016 12:00
Hello World Carbide

Hello World Carbide

This Gist was automatically created by Carbide, a free online programming environment.

[You can view a live, interactive versi

@chrtze
chrtze / chart.js
Created November 23, 2015 20:00
Line Chart Example
var Chart = (function(window,d3) {
var svg, data, x, y, xAxis, yAxis, dim, chartWrapper, line, path, margin = {}, width, height, locator;
var breakPoint = 768;
d3.csv('data.csv', init); //load data, then initialize chart
//called once the data is loaded
function init(csv) {
@chrtze
chrtze / frontend.js
Last active August 29, 2015 14:22
Ghost: Display All Tags
//insert at line 61 in: /core/server/controllers/frontend.js
function formatPageResponse(posts, page) {
// Delete email from author for frontend output
// TODO: do this on API level if no context is available
posts = _.each(posts, function (post) {
if (post.author) {
delete post.author.email;
}
return post;
@chrtze
chrtze / logstash
Created May 28, 2015 11:44
logstash_config_update
filter {
csv {
separator => ","
columns => ["Date","Open","High","Low","Close","Volume","Adj Close"]
}
mutate {convert => ["High", "float"]}
mutate {convert => ["Open", "float"]}
mutate {convert => ["Low", "float"]}
mutate {convert => ["Close", "float"]}
mutate {convert => ["Volume", "float"]}
@chrtze
chrtze / evt.js
Last active October 1, 2015 12:18
simple touch event fix
var hasMoved;
$(el).on('touchend touchstart touchmove', function(e) {
if(e.type == 'touchstart') {
hasMoved = false;
}
else if(e.type == 'touchmove') {
hasMoved = true;
}
else if(e.type == 'touchend') {
@chrtze
chrtze / data.csv
Last active June 19, 2021 14:08
logstash example
Date Open High Low Close Volume Adj Close
2015-04-02 125.03 125.56 124.19 125.32 32120700 125.32
2015-04-01 124.82 125.12 123.10 124.25 40359200 124.25
2015-03-31 126.09 126.49 124.36 124.43 41852400 124.43
2015-03-30 124.05 126.40 124.00 126.37 46906700 126.37
2015-03-27 124.57 124.70 122.91 123.25 39395000 123.25
2015-03-26 122.76 124.88 122.60 124.24 47388100 124.24
2015-03-25 126.54 126.82 123.38 123.38 51106600 123.38
2015-03-24 127.23 128.04 126.56 126.69 32713000 126.69
2015-03-23 127.12 127.85 126.52 127.21 36761000 127.21
@chrtze
chrtze / README.md
Created October 21, 2014 18:35
small multiple maps