A flexibile survey storage service. Allows you to create new surveys by describing the fields used in the survey. Surveys can then be answered, where each answer is stored alongside the ip that sent in the answer (limited to IPv4). Survey answers can be accessed as a CSV export.
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
| d3.nest() | |
| .key(function(num) { return num % 2 == 0 ? "even" : "odd"; }) | |
| .rollup(function(values) { return values.length; }) | |
| .map([1, 2, 3, 4, 5]); |
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
| (function(console) { | |
| console.save = function(data, filename) { | |
| if (!data) { | |
| console.error('Console.save: No data') | |
| return; | |
| } | |
| if (!filename) filename = 'console.json' |
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
| antal adresse | |
| ------------------------------------- | |
| 16x Fritidshaven 36, 2640 Hedehusene | |
| 6x Løvegade 76 A st tv, 4200 Slagelse | |
| 6x Løvegade 76 A 3 tv, 4200 Slagelse | |
| 6x Løvegade 76 A 2 tv, 4200 Slagelse | |
| 6x Løvegade 76 A 1 tv, 4200 Slagelse | |
| 5x Løvegade 76 A 4 th, 4200 Slagelse | |
| 5x Løvegade 76 A 3 th, 4200 Slagelse | |
| 5x Løvegade 76 A 2 th, 4200 Slagelse |
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 gid2Wid = function (gid) { | |
| var xorval = gid > 31578 ? 474 : 31578; | |
| var letter = gid > 31578 ? 'o' : ''; | |
| return letter + parseInt((gid ^ xorval)).toString(36); | |
| }; |
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
| #!bash | |
| $ find ../static -type f -name 'content.json' \ | |
| -exec grep -Hi "ga('send', 'pageview');" {} \; \ | |
| -exec gsed -i "s|ga('send', 'pageview');|ga('set', 'anonymizeIp', true);ga('send', 'pageview');|g" {} \; | |
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
| license: mit |
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
| out = ''; | |
| document.querySelectorAll('li.Box-row').forEach((t) => { | |
| var a = t.querySelector('a'); | |
| var text = a.innerText; | |
| var link = a.getAttribute('href'); | |
| out += `## [${text}](${link})\n`; | |
| }); | |
| console.log(out); |
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
| let subscribers = ['foo@mail.dk', 'bar@mail.co.uk']; | |
| let count = subscribers.length; | |
| let current = 0; | |
| let URL = 'https://newsletter.services.tv2.dk/api/unsubscribe'; | |
| let unsub = (mail) => { | |
| $.post(URL, { |
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
| let items = [ | |
| {name: 'A'}, | |
| {name: 'B'}, | |
| {name: 'C'} | |
| ]; | |
| let serial = items.map((item) => { | |
| return item.name | |
| }).reduce((prevVal, currVal, currentIndex, array) => { | |
| var delim = currentIndex === array.length-1 ? ', and ': ', ' |