terminal:
npm i --save-dev rollup rollup-watch rollup-plugin-typescript typescript typings
npm i -S react react-dom
./node_modules/.bin/typings install react react-dom --save
mkdir src dist
touch src/index.tsx
use tokio::{runtime::Builder, sync::{mpsc}}; | |
use winit::{event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, window::{Window, WindowBuilder}}; | |
pub struct Gpu { | |
pub surface: wgpu::Surface, | |
pub device: wgpu::Device, | |
pub queue: wgpu::Queue, | |
pub sc_desc: wgpu::SwapChainDescriptor, | |
pub swap_chain: wgpu::SwapChain, |
export const h=(t,p,...c)=>({t,p,c,k:p&&p.key}) | |
export const render=(e,d,t=d.t||(d.t={}),p,r,c,m,y)=> | |
// arrays | |
e.map?e.map((e,p)=>render(e,d,t.o&&t.o[p])): | |
// components | |
e.t.call?(e.i=render((render.c=e).t(Object.assign({children:e.c},e.p),e.s=t.s||{},t=> | |
render(Object.assign(e.s,t)&&e,d,e)),t.i||d,t&&t.i||{}),d.t=t=e):( | |
// create notes | |
m=t.d||(e.t?document.createElement(e.t):new Text(e.p)), | |
// diff props |
// JXA script to categorise selected rows of bank transactions in Numbers.app. Paste | |
// this script into ScriptEditor.app and run it there. | |
// | |
// See these for more info on using JXA: | |
// | |
// https://developer.apple.com/library/archive/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/Introduction.html | |
// https://www.macstories.net/tutorials/getting-started-with-javascript-for-automation-on-yosemite/ | |
// | |
// | |
// |
export default function retargetEvents(el) { | |
// Here include necessary events' name to track | |
['onClick', 'onChange'].forEach(eventType => { | |
const transformedEventType = eventType.replace(/^on/, '').toLowerCase(); | |
el.addEventListener(transformedEventType, event => { | |
for (let i in event.path) { | |
const item = event.path[i], | |
internalComponent = findReactInternal(item); |
terminal:
npm i --save-dev rollup rollup-watch rollup-plugin-typescript typescript typings
npm i -S react react-dom
./node_modules/.bin/typings install react react-dom --save
mkdir src dist
touch src/index.tsx
// | |
// Lambda's timeout needs to be >5 seconds, 10 should do | |
// | |
var startedAt = new Date(); | |
var interval = setInterval(function () { | |
console.log(startedAt, new Date()); | |
}, 1000); |
/* eslint-disable no-var */ | |
var path = require('path'); | |
var autoprefixer = require('autoprefixer'); | |
const MATCH_ALL_NON_RELATIVE_IMPORTS = /^\w.*$/i; | |
module.exports = [{ | |
output: { | |
filename: '[name].js', | |
library: 'atrium-react-plugin-beta', |
/* ebnf file for es 6 - MAY CONTAIN ERRORS / DISAMBIGUITY */ | |
Grammer::= Statement | |
/* Lexical grammer */ | |
SourceCharacter ::= #x0000-#x10FFFF | |
InputElementDiv ::= WhiteSpace | LineTerminator | Comment | CommonToken | DivPunctuator | RightBracePunctuator | |
InputElementRegExp ::= WhiteSpace | LineTerminator | Comment | CommonToken | RightBracePunctuator | RegularExpressionLiteral | |
InputElementRegExpOrTemplateTail ::= WhiteSpace | LineTerminator | Comment | CommonToken | RegularExpressionLiteral | TemplateSubstitutionTail | |
InputElementTemplateTail ::= WhiteSpace | LineTerminator | Comment | CommonToken | DivPunctuator | TemplateSubstitutionTail | |
WhiteSpace ::= "<TAB>" | "<VT>" | "<FF>" | "<SP>" | "<NBSP>" | "<ZWNBSP>" | "<USP>" |
Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.
All files were downloaded from https://cdnjs.com and named accordingly.
Output from ls
command is stripped out (irrelevant stuff)
$ ls -lhS
566K Jan 4 22:03 angular2.min.js
In this article, I'll walk through a basic Rails (3.2.x) setup for creating a nested resource for two models. Nested resources work well when you want to build out URL structure between two related models, and still maintain a RESTful convention. This code assumes you are running RVM to manage Ruby/Gem versions, and Git for version control.
$ mkdir family # create rvm gemset
$ echo "rvm use --create ruby-1.9.2@family" > family/.rvmrc
$ cd family # install rails
$ gem install rails # create new rails project
$ rails new . # version control