CLICK ME
yes, even hidden code blocks!
print("hello world!")| license: mit |
| #!/bin/bash | |
| unset URL TICKET STUB GROUP CERTHASH LANGSELEN | |
| shift | |
| while [ "$1" ]; do | |
| if [ "$1" == "-ticket" ]; then shift; TICKET=$1; fi | |
| if [ "$1" == "-stub" ]; then shift; STUB=$1; fi | |
| if [ "$1" == "-group" ]; then shift; GROUP=$1; fi | |
| if [ "$1" == "-certhash" ]; then shift; CERTHASH=$1; fi | |
| if [ "$1" == "-url" ]; then shift; URL=$1; fi |
| #!/system/xbin/bash | |
| #Based on https://github.com/termux/termux-app/issues/77 | |
| export PREFIX='/data/data/com.termux/files/usr' | |
| export HOME='/data/data/com.termux/files/home' | |
| export LD_LIBRARY_PATH='/data/data/com.termux/files/usr/lib' | |
| export PATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:$PATH" | |
| export LANG='en_US.UTF-8' | |
| export SHELL='/data/data/com.termux/files/usr/bin/bash' | |
| export BIN='/data/data/com.termux/files/usr/bin' | |
| export TERM=vt220 |
| /** | |
| * Convert a hex string to an ArrayBuffer. | |
| * | |
| * @param {string} hexString - hex representation of bytes | |
| * @return {ArrayBuffer} - The bytes in an ArrayBuffer. | |
| */ | |
| function hexStringToArrayBuffer(hexString) { | |
| // remove the leading 0x | |
| hexString = hexString.replace(/^0x/, ''); | |
I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.
But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.
Svelte is a language.
Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?
A few projects that have answered this question:
| { | |
| Title: 'My awesome markdown file', | |
| Author: 'Me', | |
| Scripts: [ | |
| 'js/doStuff.js', | |
| 'js/doMoreStuff.js' | |
| ] | |
| } |
const searchHistory = query => {console.dir(JSON.parse(localStorage.getItem('consoleHistory')).filter(function(item){ return ~item.indexOf(query);}))}
searchHistory('token')| // Calculates a curve that goes through a number of points. | |
| // There are lots of mathematical approaches to do so | |
| // (see: https://en.wikipedia.org/wiki/Cubic_Hermite_spline). | |
| // The most commonly used seems to be the Catmull–Rom spline. | |
| // My approch here is not intended to be a new general | |
| // solution to this problem, but it should fit some geometrical | |
| // and graphical needs. See | |
| // https://hartmut-bohnacker.de/projects/points-to-curve | |
| // for more explanation. |