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
WebJSX: | |
====== | |
# WebJSX | |
A minimal library for building web applications with JSX and Web Components. It focuses on simplicity, providing just **two core functions**: | |
- **`createElement`**: Creates virtual DOM elements using JSX. | |
- **`applyDiff`**: Efficiently applies changes to the real DOM by comparing virtual nodes. | |
## Examples |
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
basho \ | |
--import fs fs \ | |
--import crypto crypto \ | |
-d header '{ "alg": "RS256", "type": "JWT" }' \ | |
-d payload '{ "sub": "alice", "iss": "example.com", "iat": Date.now() }' \ | |
-d toBase64 'x => Buffer.from(JSON.stringify(x)).toString("base64")' \ | |
-d toBase64Url 'x => x.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_")' \ | |
-d base64Header 'k.toBase64Url(k.toBase64(k.header))' \ | |
-d base64Payload 'k.toBase64Url(k.toBase64(k.payload))' \ | |
-d privateKey 'fs.readFileSync(process.cwd() + "/privatekey.pem", "utf8")' \ |
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
// Fireworks JavaScript Command | |
// Exports current document state as SVG graphics format | |
// Install by copying to Fireworks/Configuration/Commands/ | |
// Run via the Commands menu in Fireworks | |
// Aaron Beall 2010-2011 | |
// Version | |
var VERSION = "0.6.1"; | |
// Params |
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
basho --import './package.json' pack -j pack -j 'Object.keys(x.dependencies)' -m x -e 'npm install ${x}@latest' |
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
// Copyright Pristine Initiatives, 2000. No part of this may be - | |
// copied without written consent from Pristine Initiatives. | |
// Please send all bug reports, comments to [email protected] | |
// upd : 12/27/00 m/d/y | |
//globals | |
/* | |
todo : | |
imp >> on uploading change the root to / instead of CalicutShop/ : done | |
*/ |
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
/* jshint node:true */ | |
/* eslint-env node */ | |
/* | |
* This will look at the current version of all of your dependencies and update your package.json | |
* with the specific version that you currently have in node_modules. This will save you from the | |
* sadness that is: DEPENDENCY MANAGEMENT | |
* | |
* Place this file in a folder that's a a sibling to your package.json and node_modules | |
* Then simply run: node scripts/package-strict |
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
<html> | |
<head> | |
<script | |
src="https://unpkg.com/react@16/umd/react.development.js" | |
crossorigin | |
></script> | |
<script | |
src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" | |
crossorigin | |
></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
const TodoList = ({ todos, pathArr }) => { | |
const [first, todoId] = pathArr; | |
return ( | |
<div> | |
<h1>Todos Module</h1> | |
{typeof todoId === "undefined" ? ( | |
<div> | |
<h2>List of todos:</h2> | |
{todos ? ( | |
todos.map(todo => <Todo key={todo.id} todo={todo} />) |
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
window.onpopstate = ev => | |
storePathInState(window.location.pathname.split("/").slice(1)); |
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 createClickHandler(url) { | |
return ev => { | |
history.pushState({}, undefined, url); | |
storePathInState(url.split("/").slice(1)); | |
ev.preventDefault(); | |
}; | |
} |
NewerOlder