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
<!-- generated via npm run build && npx create-polyfill-service-url analyse --file public/bundle.js --> | |
<script crossorigin="anonymous" src="https://cdn.polyfill.io/v3/polyfill.min.js?features=Array.from,Array.isArray,Array.prototype.entries,Array.prototype.fill,Array.prototype.filter,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.keys,Array.prototype.map,ArrayBuffer,console,DataView,Date.prototype.toISOString,document,fetch,Function.prototype.bind,globalThis,Map,Object.create,Object.defineProperties,Object.defineProperty,Object.entries,Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.getPrototypeOf,Object.keys,Object.setPrototypeOf,Promise,Reflect,Reflect.construct,Set,Symbol,Symbol.iterator,WeakMap,WeakSet"></script> |
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
<script> | |
/* This is a quick test of Pts (https://ptsjs.org) with Svelte (https://svelte.dev) */ | |
import { onMount } from "svelte"; | |
import { CanvasSpace, Rectangle } from "pts"; | |
let container, space, form; | |
onMount(() => { | |
space = new CanvasSpace(container).setup({bgcolor: "#52f"}); | |
form = space.getForm(); | |
space.add( time => { |
- Open the application such that you see the icon on your screen.
- Open Activity Monitor
- Double click the name of the application (i.e. Finder or System Preferences)
- Select "Open Files and Ports"
- Copy the output to a file and then
grep
for.icns
Similarly you could run this command, but it may take several minutes to complete:
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
// 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. |
- Undock the console (click on the icon in the bottom-left corner, ![undock icon][1]).
(if you don't see ![the undock icon][2], but ![][3], then hold the mouse pressed for a few seconds to get the desired icon) - Press Ctrl + Shift + J to open the console for this console. (On OSX use Cmd + Option + i)
- Use the following snippet to get an array of matches for your search term:
const searchHistory = query => {console.dir(JSON.parse(localStorage.getItem('consoleHistory')).filter(function(item){ return ~item.indexOf(query);}))}
searchHistory('token')
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
{ | |
Title: 'My awesome markdown file', | |
Author: 'Me', | |
Scripts: [ | |
'js/doStuff.js', | |
'js/doMoreStuff.js' | |
] | |
} |
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:
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
/** | |
* 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/, ''); | |
NewerOlder