Last active
October 24, 2018 16:11
-
-
Save brianarn/8a15cdd7a6b26c55fb499aa1507bf476 to your computer and use it in GitHub Desktop.
Revisions
-
brianarn revised this gist
Oct 24, 2018 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,6 @@ A colleague took a Shrek image, sliced it into 100 emojis, and put it in our Sla So, I wrote a super gross terse piece of JS to generate new ... images ... of Shrek using this random art. Here is that gross bit of art. If you'd like to see an example, look at the screenshot in [this tweet](https://twitter.com/brianarn/status/1055129491821879296). -
brianarn created this gist
Oct 24, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ # Generative Shrek Art in Slack A colleague took a Shrek image, sliced it into 100 emojis, and put it in our Slack. You can easily tile it. So, I wrote a super gross terse piece of JS to generate new ... images ... of Shrek using this random art. Here is that gross bit of art. 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ counts = []; for (var i = 1; i <= 100; i++) { counts.push(i); } counts.sort((a,b)=> Math.floor(Math.random() * 3) - 1); copy(counts .map(num => num.toString().padStart(3, 0)) .map(pos => `:tiled_shrek${pos}:`) .reduce((accum, curr, i) => { if (i % 10 === 0) { curr = `\n${curr}`; } return accum + curr; }, ''));