This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// data | |
var data = [ | |
{timestamp: 1, value: 7}, | |
{timestamp: 2, value: 8}, | |
{timestamp: 3, value: 12}, | |
{timestamp: 4, value: 16}, | |
{timestamp: 5, value: 21}, | |
{timestamp: 6, value: 22}, | |
{timestamp: 7, value: 13}, | |
{timestamp: 8, value: 8}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Pure D3 Charts</title> | |
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700"> | |
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic"> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Pure D3 Charts</title> | |
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700"> | |
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic"> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Data Generator | |
*/ | |
var DataGenerator = (function() { | |
// number of series | |
var _numberOfSeries = 1; | |
// number of data points | |
var _numberOfDataPoints = 40; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://jsbin.com/naleno/1/edit | |
// array | |
var source = ['1', '1', 'foo', '2', '3', '5', 'bar', '8', '13']; | |
var result1 = source; | |
console.log(result1); | |
result2 = source | |
.map(x => parseInt(x)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by marco on 30.08.16. | |
*/ | |
/** | |
* formats text as following: | |
* - 2-character words are inverted in case for each character | |
* - 3-character words are returned in reverse order | |
* @param {string} text | |
* @returns {string} formatted text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = [1, 2, 3]; | |
var REFRESH_RATE = 16.67; | |
function veryExpensive(item) { | |
// ... | |
} | |
function forEachExpensive(data, callback) { | |
var index = 0; | |
var dataLength = data.length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// black lists | |
var linkBlackList = [ | |
// start of the URI you want to black list, e.g. '/display/~marco.lehmann' | |
]; | |
var userBlackList = [ | |
// user name you want to black list, e.g. 'marco.lehmann' | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# get platform to determine IP address accordingly | |
PLATFORM=$(uname -s) | |
if [ "$PLATFORM" == "Darwin" ]; then | |
IP=$(ipconfig getifaddr en0) | |
elif [ "$PLATFORM" == "Linux" ]; then | |
IP=$(hostname -I) | |
else | |
echo "Unknown platform. Can not determine IP address that way." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// dependencies | |
const https = require('https'); | |
const express = require('express'); | |
const multer = require('multer'); | |
// app | |
const app = express(); | |
const storage = multer.memoryStorage(); |
OlderNewer