Skip to content

Instantly share code, notes, and snippets.

@yashha
yashha / Bookmarklet.txt
Last active December 22, 2018 20:51
Draft of Bookmarkelt which combines html2pdf with readability
javascript:(function()%7BparcelRequire%3Dfunction(e%2Cr%2Cn%2Ct)%7Bvar i%3D"function"%3D%3Dtypeof parcelRequire%26%26parcelRequire%2Co%3D"function"%3D%3Dtypeof require%26%26require%3Bfunction u(n%2Ct)%7Bif(!r%5Bn%5D)%7Bif(!e%5Bn%5D)%7Bvar f%3D"function"%3D%3Dtypeof parcelRequire%26%26parcelRequire%3Bif(!t%26%26f)return f(n%2C!0)%3Bif(i)return i(n%2C!0)%3Bif(o%26%26"string"%3D%3Dtypeof n)return o(n)%3Bvar c%3Dnew Error("Cannot find module '"%2Bn%2B"'")%3Bthrow c.code%3D"MODULE_NOT_FOUND"%2Cc%7Dp.resolve%3Dfunction(r)%7Breturn e%5Bn%5D%5B1%5D%5Br%5D%7C%7Cr%7D%2Cp.cache%3D%7B%7D%3Bvar l%3Dr%5Bn%5D%3Dnew u.Module(n)%3Be%5Bn%5D%5B0%5D.call(l.exports%2Cp%2Cl%2Cl.exports%2Cthis)%7Dreturn r%5Bn%5D.exports%3Bfunction p(e)%7Breturn u(p.resolve(e))%7D%7Du.isParcelRequire%3D!0%2Cu.Module%3Dfunction(e)%7Bthis.id%3De%2Cthis.bundle%3Du%2Cthis.exports%3D%7B%7D%7D%2Cu.modules%3De%2Cu.cache%3Dr%2Cu.parent%3Di%2Cu.register%3Dfunction(r%2Cn)%7Be%5Br%5D%3D%5Bfunction(e%2Cr)%7Br.exports%3Dn%7D%2C%7B%7D%5D%7D%3Bfor(var f%3D0%3Bf<n.
<alignment jcr:primaryType="nt:unstructured"
name="./alignChildren"
fieldLabel="Alignment of components"
required="{Boolean}true"
selectionMode="single"
sling:resourceType="granite/ui/components/coral/foundation/form/buttongroup">
<items jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured"
name="./default"
@yashha
yashha / richtext 6.3
Created January 30, 2018 17:03
richtext 6.3
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<rtField
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/richtext"
granite:id="letter_text"
fieldDescription="Required."
name="./letter"
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: '#F81CE5',
@yashha
yashha / 0_reuse_code.js
Created December 11, 2015 14:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console