Skip to content

Instantly share code, notes, and snippets.

@hendrikras
hendrikras / mockdata.json
Created February 14, 2023 14:22
mock data for the vim article
[
{
"time":1409522400000
},
{
"time":1409608800000
},
{
"time":1409695200000
},
@hendrikras
hendrikras / contestants.controller.js
Created February 17, 2016 14:19
contestants.controller excerpt
vm.isBiggerThenMinimum = function(el) {
return vm.minimum <= el.Age;
};
<table>
<th>Name</th>
<th>Sirname</th>
<th>Birthdate</th>
<th>Age</th>
<tr ng-repeat="contestant in vm.contestants | filter: vm.isBiggerThenMinimum">
<td>{{contestant.Name}}</td>
<td>{{contestant.Sirname}}</td>
<td>{{contestant.Occupation}}</td>
<td>{{contestant.Age}}</td>
@hendrikras
hendrikras / bower.json
Created February 17, 2016 12:27
bower deps
"dependencies": {
"angular": "~1.4.x",
"angular-resource": "~1.4.0",
"papaparse": "~4.1.2"
},
function parseCSV(file) {
return $q(function(resolve, reject) {
Papa.parse(file, {
complete: resolve,
error: reject,
delimiter: ',',
dynamicTyping: true,
header:true,
fields: ['Name', 'Sirname', 'Age', 'Occupation']
});
@hendrikras
hendrikras / contestants.csv
Created February 17, 2016 09:03
CSV example
Name Sirname Age Occupation
John Doe 33 Developer
Sandra Sanders 20 Student
Peter Peterson 55 Physicist