This file contains 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
import { parse, format } from 'path' | |
import Progress from 'cli-progress' | |
import sharp from 'sharp' | |
const fit = process.argv[2] | |
const width = parseInt(process.argv[3]) | |
const height = parseInt(process.argv[4]) | |
const paths = process.argv.splice(5) | |
const toFile = (path) => { |
This file contains 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
// On first run only, uncomment line bellow and replace '888...' with the token returned after login | |
// Keychain.set("ACKEE_KEY", "88888888-8888-8888-8888-888888888888") | |
// Ackee configuration | |
const ACKEE_KEY = Keychain.get('ACKEE_KEY') | |
const ACKEE_API = 'https://ackee.example.com/api' | |
const TIME_ZONE = 'Europe/Berlin' | |
const createWidget = async () => { | |
const viewsToday = await getViewsToday() |
This file contains 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
Show hidden characters
{ | |
"parserOptions": { | |
"ecmaVersion": 2018, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true | |
} | |
}, | |
"plugins": [ | |
"react" |
This file contains 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 throttle = (fn, threshold) => { | |
let last | |
let timeout | |
return (...args) => { | |
const now = Date.now() | |
const shouldDelay = last && now < last + threshold | |
const delay = shouldDelay === true ? threshold - (now - last) : 0 |
This file contains 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
"M78,0 L78.8918331,0.216238031 C80.7796201,0.673959707 82.3332983,2.08608489 83.0043945,3.9000001 C83.0192652,3.94019419 83.0330484,3.98600042 83.0457442,4.03741878 L83.0390876,7.96097867 C83.0390545,20.7025492 93.3365052,31 106.039054,31 L268.960946,31 C281.663495,31 291.960946,20.7025492 291.960946,8 C291.960946,7.99147462 291.95879,6.71458263 291.954479,4.16932405 C291.954323,4.07746778 291.970341,3.98630146 292.001801,3.9000001 C292.667785,2.07301174 294.211271,0.676168263 296.108167,0.216238031 L297,0 L335,0 C357.09139,-4.05812251e-15 375,17.90861 375,40 L375,772 C375,794.09139 357.09139,812 335,812 L40,812 C17.90861,812 2.705415e-15,794.09139 0,772 L0,40 C-2.705415e-15,17.90861 17.90861,4.05812251e-15 40,0 L78,0 Z" | |
.split(' ') | |
.reduce((acc, entry) => { | |
// Remove the first character from a string | |
const removeChars = (str = '') => str.replace(/^[A-Z]/g,'') | |
// Divide a value with the current divider | |
const divide = (dividers) => (value, index) => value / dividers[index] |
This file contains 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
<label for="familyname">Family name</label> | |
<input id="familyname" name="familyname" type="text" autocorrect="off" autocomplete="family-name" placeholder="Berners-Lee"> |
This file contains 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
<select disabled> | |
<option value="a">A</option> | |
<option value="b">B</option> | |
</select> | |
<select> | |
<option disabled>Choose A or B</option> | |
<option value="a">A</option> | |
<option value="b">B</option> | |
</select> |
This file contains 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
<input placeholder="Jane Doe" ...> |
This file contains 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
<label for="email">E-Mail</label> | |
<input id="email" ...> |
This file contains 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
<input pattern="\d*" ...> | |
<input type="email" ...> | |
<input type="url" ...> |
NewerOlder