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
| <div class="scale__container--js"> | |
| <h1 class="scale--js">I'm full width!</h1> | |
| </div> |
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
| .scale__container--js { | |
| text-align: center; | |
| } | |
| .scale--js { | |
| display: inline-block; | |
| transform-origin: 50% 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
| function scaleHeader() { | |
| var scalable = document.querySelectorAll('.scale--js'); | |
| var margin = 10; | |
| for (var i = 0; i < scalable.length; i++) { | |
| var scalableContainer = scalable[i].parentNode; | |
| scalable[i].style.transform = 'scale(1)'; | |
| var scalableContainerWidth = scalableContainer.offsetWidth - margin; | |
| var scalableWidth = scalable[i].offsetWidth; | |
| scalable[i].style.transform = 'scale(' + scalableContainerWidth / scalableWidth + ')'; | |
| scalableContainer.style.height = scalable[i].getBoundingClientRect().height + 'px'; |
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
| senderPlaceholder.setAttribute('text', `value:from: ${wish.sender}; font: /assets/fonts/raleway/raleway.fnt; fontImage: /assets/fonts/raleway/raleway.png; color: #000000`); |
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 s = new SyncanoClient('instance-name'); | |
| s.get('Christmas2017/get-wishes/', {wish: wishId}) |
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
| version: 2 | |
| jobs: | |
| build: | |
| docker: | |
| - image: circleci/node:latest | |
| steps: | |
| - checkout | |
| - run: npm install | |
| - run: npx gulp build | |
| - run: node .circleci/deploy.js |
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 FtpDeploy = require('ftp-deploy'); | |
| var ftpDeploy = new FtpDeploy(); | |
| var config = { | |
| username: process.env.FTPUSERNAME, | |
| password: process.env.FTPPASS, | |
| host: process.env.FTPHOST, | |
| port: 21, | |
| localRoot: __dirname + "/../dist/", | |
| remoteRoot: "/", |
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 gpio = require('onoff').Gpio | |
| const hyperdrive = new gpio(3,'out') | |
| hyperdrive.writeSync(1) |
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 { spawn } = require('child_process'); | |
| const player = spawn('aplay', [`audio/chewbacca.wav`]); |
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 ws = new WebSocket(socketUrl) | |
| ws.on("open", function open() { | |
| console.log("Connected 🚀") | |
| }); | |
| ws.on("message", function incoming(data) { | |
| const parsed = JSON.parse(data) | |
| const message = parsed.payload |
OlderNewer