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 wait(t) { | |
| return new Promise(resolve => setTimeout(resolve, t)); | |
| } | |
| const tracks = Array.from(document.querySelectorAll(".trackManagerTrackList__item")); | |
| for (track of tracks) { | |
| const moreBtn = track.querySelector('.sc-button-more'); | |
| moreBtn.click(); | |
| await wait(500 + Math.random(500)); | |
| const downloadBtn = document.querySelector('.sc-button-download'); |
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
| { | |
| showPlayerStart: true, | |
| showPlayerEnd: true, | |
| duration: 180, | |
| frameRate: 60, | |
| pixelEffectFunc: function (start, end, pixelX, pixelY, delta) { | |
| var a = start.Image.GetPixel(pixelX, pixelY); | |
| var b = end.Image.GetPixel(pixelX, pixelY); | |
| var w = bitsy.tilesize * bitsy.mapsize; | |
| if (pixelY % 2) { |
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
| { | |
| showPlayerStart: true, | |
| showPlayerEnd: true, | |
| duration: 500, | |
| frameRate: 30, | |
| pixelEffectFunc: function (start, end, pixelX, pixelY, delta) { | |
| var a = start.Image.GetPixel(pixelX, pixelY); | |
| var b = end.Image.GetPixel(pixelX, pixelY); | |
| var r = a; | |
| let tileX = Math.floor(pixelX / bitsy.tilesize); |
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
| const height = 6; | |
| const width = 4; | |
| const result = `<?xml version="1.0"?> | |
| <font> | |
| <info size="${Math.max(width, height)}"/> | |
| <common lineHeight="${height}" base="${height}"/> | |
| <chars count="255"> | |
| ${new Array(255).fill(0).map((_, idx) => `<char id="${idx}" x="${idx*width}" y="0" width="${width}" height="${height}" xoffset="0" yoffset="0" xadvance="${width}" />`).join('\n')} | |
| </chars> |
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
| * { | |
| box-sizing: border-box; | |
| font-family: sans-serif; | |
| } | |
| html, | |
| body, | |
| form { | |
| margin: 0; | |
| padding: 0; |
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
| git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d |
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
| const obj = { | |
| // your obj here | |
| }; | |
| copy(Object.entries(obj).sort(([a], [b])=>a.localeCompare(b)).reduce((r, [k, v]) => ({...r, [k]: v}), {})); |
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
| <!DOCTYPE HTML> | |
| <html> | |
| <!-- HEADER --> | |
| <head> | |
| <title>Write your game's title here</title> | |
| <script type="bitsyGameData" id="exportedGameData"> | |
| Write your game's title here |
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 l = ['word','list'] | |
| copy( | |
| Object.keys( | |
| l.reduce( | |
| (res, word)=>({ | |
| ...res, | |
| [word]:true | |
| }), | |
| {} | |
| ) |
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
| //////////// | |
| // config // | |
| //////////// | |
| const tileStr = ` | |
| 00000000 | |
| 00000000 | |
| 00100100 | |
| 00100100 | |
| 00000000 | |
| 01000010 |