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
| import {useEffect} from 'preact/hooks'; | |
| export default function Kofi({name='davidsharp',text='Tip Me',backgroundColor='#fcbf47',textColor='#323842'}){ | |
| const widgetScript = (`console.log('Donate @ ko-fi.com/${name}') | |
| kofiWidgetOverlay.draw('${name}', { | |
| 'type': 'floating-chat', | |
| 'floating-chat.donateButton.text': '${text}', | |
| 'floating-chat.donateButton.background-color': '${backgroundColor}', | |
| 'floating-chat.donateButton.text-color': '${textColor}' | |
| });`) |
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
| # symlinking the node binary with whatever nvm has set it as | |
| rm /usr/local/bin/node | |
| ln -s $(which node) /usr/local/bin/node |
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 AutoLink({ text }) { | |
| const delimiter = /((?:https?:\/\/)?(?:(?:[a-z0-9]?(?:[a-z0-9\-]{1,61}[a-z0-9])?\.[^\.|\s])+[a-z\.]*[a-z]+|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})(?::\d{1,5})*[a-z0-9.,_\/~#&=;%+?\-\\(\\)]*)/gi; | |
| return ( | |
| <React.Fragment> | |
| {text.split(delimiter).map((word,i) => { | |
| const isUrl = i%2; | |
| return isUrl ? (<a href={word.startsWith("http") ? word : `http://${word}`}>{word}</a>) : word; | |
| })} | |
| </React.Fragment> |
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
| XMLHttpRequest = new Proxy(XMLHttpRequest, { | |
| construct:function(t,a){ | |
| const req = new t(); | |
| return new Proxy(req, { | |
| get:function(o,p){ | |
| if(p=='status')return 9001 | |
| return typeof o[p] == 'function'?o[p].bind(o):o[p] | |
| }, | |
| set: function(target, prop, value) { | |
| Reflect.set(target, prop, value) // or target[prop] = value |
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 rot13 = str => str.replace(/[a-z]/gi,x=>{ | |
| const c=x.charCodeAt(0) | |
| const a=c>=97?97:65 | |
| return String.fromCharCode( | |
| a+((c-a+13)%26) | |
| ) | |
| }) |
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 fn = x => x + (x * ((x-1)/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
| @-webkit-keyframes wipe { | |
| 0% { | |
| -webkit-mask-size: 0% 0%; | |
| } | |
| 100% { | |
| -webkit-mask-size: 550% 550%; | |
| } | |
| } | |
| .remark-visible .remark-slide-content { |
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
| import React, { | |
| PropTypes, Component | |
| } from 'react'; | |
| import { | |
| Animated, Easing | |
| } from 'react-native'; | |
| // BYO sync icon | |
| const SYNC = require('../images/sync.png') |
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
| HzRBnyQt1d2e-uD5L6T7PJdXrnt7_9Q_0_wNPSvW3Z797p9nAsLydSubwj0r1w273L6hdav9pk3mHpXrnt3v7iebbfm4J5uNPSvW3AAzZ7972F9NGAAAEE0yGAAE0nAuLytdSebCAkkkj0Bggctutw2LKApTLAobMAIJJJJpPBcXi7k82cbHpbL5a9QWSSXUAQ60CAS3YAQfC4l4J5t5RKAzhskk0FFA0pFA0nAidJujEAkDJA9JgbXib7kAAJ5IBA5sBAI5TAAQuEAQOJAQzRCAz1CASQ_UCAgckAgctAgc2Ag8pEAI52AA5IBA5aBA5TJAQSuNAQQOSAQQSO |
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
| .jump { | |
| display: inline-block; | |
| animation-duration: 1.5s; | |
| animation-name: jump; | |
| animation-iteration-count: infinite; | |
| } | |
| .jump.alt { | |
| animation-delay: .75s; | |
| } | |
| @keyframes jump { |