- https://picassojs.com
- https://github.com/qlik-oss/picasso.js
- https://twitter.com/picassodotjs
- https://github.com/qlik-oss/nebula.js Brand new nebula.js
- http://picassojs.studio What you see is what you get live editor
- https://qlikbranch-slack-invite.herokuapp.com/ #picasso-js Channel on Qlik Branch Slack
This file contains 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
debounce: function(func, wait, immediate) { | |
// Returns a function, that, as long as it continues to be invoked, will not | |
// be triggered. The function will be called after it stops being called for | |
// N milliseconds. If `immediate` is passed, trigger the function on the | |
// leading edge, instead of the trailing. | |
// taken from https://github.com/jashkenas/underscore/blob/master/underscore.js | |
var timeout, args, context, timestamp, result; | |
var later = function() { | |
var last = new Date().getTime() - timestamp; |
This file contains 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
export default function attachParallax(elm) { | |
document.addEventListener('mousemove', (e) => { | |
window.requestAnimationFrame(() => { | |
const left = (e.clientX / window.innerWidth) * 5; | |
const top = (e.clientY / (window.innerHeight)) * 5; | |
elm.style.backgroundPosition = `${47.5 + left}% ${47.5 + top}%`; | |
}); | |
}, false); | |
} |
This file contains 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 JSON2Matrix(jsonArray) { | |
let matrixHeader = []; | |
let matrixData = []; | |
for (let idx = 0; idx < jsonArray.length; idx++) { | |
const cur = jsonArray[idx]; | |
const keys = Object.keys(cur); | |
let matrixLine = []; | |
for (let idk = 0; idk < keys.length; idk++) { |
This file contains 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
let versions = []; | |
(await (await fetch('https://unpkg.com/browse/picasso.js/')).text()).replace(/<option[^>]*value="([^"]*)"[^>]*>/gm, (match, version) => versions.push(version) ); |
This file contains 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
Add-WindowsCapability -Online -Name OpenSSH.Server* | |
Start-Service sshd | |
Set-Service -Name sshd -StartupType 'Automatic' | |
This file contains 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
// ES6 Async version of the "classic" JavaScript Debounce function. | |
// Works both with and without promises, so you can replace your existing | |
// debounce helper function with this one (and it will behave the same). | |
// The only difference is that this one returns a promise, so you can use | |
// it with async/await. | |
// | |
// I've converted this into a TypeScript module, and added a few more | |
// features to it, such as the ability to cancel the debounce, and also | |
// execute the function immediately, using the `doImmediately` method. | |
// |
This file contains 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
/** | |
* Resolves the value at the given JSON path | |
* | |
* @param {String} path Path with / for children | |
* @param {Object} obj Object to use when searching | |
* @return {Object} Result at the end of the path | |
* | |
* @example | |
* let path = "/path/to/paradise"; | |
* let obj = { |
This file contains 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
import React, { useEffect } from 'react'; | |
import picasso from 'picasso.js'; | |
const debounce = (func, wait, immediate = false) => { | |
let timeout; | |
return function debouncedFn(...args) { | |
return new Promise((resolve) => { | |
clearTimeout(timeout); | |
timeout = setTimeout(() => { |
OlderNewer