find . -name *.css -delete
find . -name *.css -delete && find . -name *.json -delete && find . -name *.bemhtml -delete && find . -name *.js -delete && find . -empty -type d -delete
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 _pairs = function(obj) { | |
| var resArr = []; | |
| for (k in obj) { | |
| if(obj.hasOwnProperty(k)) { | |
| resArr.push([k, obj[k]]); | |
| } | |
| } | |
| return resArr; |
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
| Array.apply(null, Array(3)).map(function(x, i) { return i; }); |
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
| document.body.addEventListener('click', function chooseElem (e) { | |
| e.preventDefault(); | |
| e.stopPropagation(); | |
| var text = e.target.innerText; | |
| console.groupCollapsed ('Text'); | |
| console.log(text); | |
| console.groupEnd('Text'); |
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 removeSpaces = str => str.replace(/\s/g, ''); | |
| const pickObjProps = (obj, props) => props.reduce((acc, key) => obj[key] ? acc.concat([obj[key]]) : acc, []); |
Hi, my name is Stan. And I moved here with my family just about 2 months ago from Russia.
And I'm very nervous now. Because it's my first talk in English. I hope it goes well. But. Anyway. Let's start.
When I started getting into web development a while ago, I was doing mostly PHP. And do you know what I loved the most about PHP? It's how easy it was to start actually doing something.
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
| componentDidUpdate(prevProps, prevState) { | |
| Object.entries(this.props || {}).forEach(([key, val]) => | |
| prevProps[key] !== val && console.log(`[debug] ${this.constructor.displayName || | |
| this.constructor.name} prop '${key}' changed`) | |
| ); | |
| Object.entries(this.state || {}).forEach(([key, val]) => | |
| prevState[key] !== val && console.log(`[debug] ${this.constructor.displayName || | |
| this.constructor.name} state '${key}' changed`) | |
| ); | |
| } |
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
| // Variables used by Scriptable. | |
| // These must be at the very top of the file. Do not edit. | |
| // icon-color: red; icon-glyph: calendar-alt; | |
| const TERMS = "nature" | |
| const FORCE_IMAGE_UPDATE = true | |
| const TEST_MODE = false | |
| // Store current datetime | |
| const date = new Date() |
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
| // progress | |
| const width=125 | |
| const h=5 | |
| const w = new ListWidget() | |
| w.backgroundColor=new Color("#222222") | |
| const now = new Date() | |
| const weekday = now.getDay() == 0 ? 6 : now.getDay() - 1 | |
| const minutes=now.getMinutes() | |
| getwidget(24*60, (now.getHours() + 1)*60+minutes, "Today") |