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
| convert -delay 50 -loop 0 $(ls frame*.png | sort --version-sort) seq_frames.gif |
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
| aws stepfunctions list-executions \ | |
| --state-machine-arn arn:aws:states:...:covidAutoUpdater \ | |
| --status-filter RUNNING \ | |
| --query "executions[*].{executionArn:executionArn}" \ | |
| --output text | \ | |
| xargs -I {} aws stepfunctions stop-execution \ | |
| --execution-arn {} |
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 linearmap(inMin, inMax, outMin, outMax) { | |
| return function (x) { | |
| return (x - inMin) * (outMax - outMin) / (inMax - inMin) + outMin; | |
| }; | |
| } |
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 simplifyPath = function( points, tolerance ) { | |
| // helper classes | |
| var Vector = function( x, y ) { | |
| this.x = x; | |
| this.y = y; | |
| }; | |
| var Line = function( p1, p2 ) { | |
| this.p1 = p1; |
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 ': ', ' |
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 = ['[email protected]', '[email protected]']; | |
| 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
| 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
| 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
| #!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
| var gid2Wid = function (gid) { | |
| var xorval = gid > 31578 ? 474 : 31578; | |
| var letter = gid > 31578 ? 'o' : ''; | |
| return letter + parseInt((gid ^ xorval)).toString(36); | |
| }; |
NewerOlder