Deriving a new Array from an existing Array:
['■','●','▲'].slice(1, 3) ⟼ ['●','▲']
['■','●','■'].filter(x => x==='■') ⟼ ['■','■']
['▲','●'].map(x => x+x) ⟼ ['▲▲','●●']
['▲','●'].flatMap(x => [x,x]) ⟼ ['▲','▲','●','●']This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
Install Redis RDB Tools from here:
Take a snapshot of each redis db
$ redis-cli save
Copy the snapshots to somewhere else
$ cp ~/dump.rdb ./dump-a.rdb
| (function(settings, libraries) { | |
| localStorage.setItem('settings', JSON.stringify(settings)); | |
| localStorage.setItem('libraries', JSON.stringify(libraries)); | |
| setTimeout(function() { | |
| window.location = window.location; // Force refresh | |
| }, 0); | |
| })( | |
| //Settings | |
| { | |
| "panels": [ |
| git checkout HEAD path/to/file | |
| # Without HEAD it's not working because the file is not there anymore |