Content :
- http://wiki.imacros.net/Command_Reference
- http://wiki.imacros.net/iMacros_for_Firefox#Javascript_Scripting_Interface
iMacros supports 3 types of variables
- The macro variables !VAR0 thru !VAR9. They can be used with the SET and ADD command inside a macro.
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
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.
In that post I talked about 3 main reasons for moving from require.js to webpack:
- Common JS support
- NPM support
- a healthy loader/plugin ecosystem.
Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.
// index.html -- Sending message TO service worker, FROM page: | |
navigator.serviceWorker.controller.postMessage(message); | |
// service-worker.js -- Handling message event in service worker by posting a message back to the page: | |
self.addEventListener('message', function(event) { | |
self.clients.matchAll().then(function(client) { | |
client[0].postMessage({ | |
command: 'logMessage', | |
error: null, | |
message: 'hi there message here!!' |
#!/usr/bin/env ruby | |
# coding: UTF-8 | |
require 'yaml' | |
ALIAS = { | |
text: '/vendor/requirejs-text/text', | |
jquery: '/vendor/jquery/dist/jquery', | |
dust: '/vendor/dustjs-linkedin/dist/dust-full', | |
dustHelpers: '/vendor/dustjs-linkedin-helpers/dist/dust-helpers', | |
pagejs: '/vendor/page.js/page', |
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, user = require('./routes/user') | |
, http = require('http') | |
, path = require('path'); |
# Template composition with inclusion | |
Every template language I have seen provides some mechanism for one template to include another, thus supporting the reuse of repeated elements like headers and footers. The included templates are called partials in Mustache parlance: | |
```html | |
<!-- home.hbs --> | |
<html> | |
<body> | |
{{> header}} | |
<p> HOME </p> | |
{{> footer}} |
DEPLOYER='deployer' | |
DEPLOYER_HOME="/home/$DEPLOYER" | |
PROJECT_NAME='node-js-sample' | |
PROJECT_REPO='https://github.com/heroku/node-js-sample.git' | |
# Provisining an ubuntu server | |
apt-get -y update | |
apt-get -y upgrade | |
apt-get -y install software-properties-common | |
add-apt-repository ppa:chris-lea/node.js |