Skip to content

Instantly share code, notes, and snippets.

@marcolink
marcolink / chunkify.js
Last active January 17, 2023 23:46
Create contentful export chunks
/*
For very big spaces, we can create chunks of the export, and import them separately.
To make it work, we have to keep a specific order.
*/
const fs = require('fs');
const path = require('path');
/* the order of types must be kept */
const types = [
@hyle
hyle / ko.utils.3.5.0.signatures.js
Created September 25, 2018 09:09
KnockoutJS 3.5.0 utils (ko.utils) signatures
// knockout 3.5.0
ko.utils.addOrRemoveItem = function (array, value, included) { /* .. */ }
ko.utils.anyDomNodeIsAttachedToDocument = function (nodes) { /* .. */ }
ko.utils.arrayFilter = function (array, predicate) { /* .. */ }
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ }
@hans2103
hans2103 / _open-sans.scss
Created March 22, 2018 08:55
CSS Open Sans Embedded Font Base64 encoded
@font-face {
font-family: 'Open Sans';
font-weight: 300;
font-style: normal;
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAEdoABEAAAAAa9QAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABgAAAABYAAAAWABAA3UdQT1MAAAGYAAAAEAAAABAAGQAMR1NVQgAAAagAAABZAAAAdN3O3ptPUy8yAAACBAAAAFsAAABgfcQdpmNtYXAAAAJgAAAAlgAAAMyvDbOdY3Z0IAAAAvgAAABdAAAAqhLrE6lmcGdtAAADWAAABJoAAAe0fmG2EWdhc3AAAAf0AAAAEAAAABAAHgAjZ2x5ZgAACAQAADelAABVvDBYzPJoZWFkAAA/rAAAADYAAAA2An9GxGhoZWEAAD/kAAAAHwAAACQNhAZaaG10eAAAQAQAAAIAAAADbJK6XfZsb2NhAABCBAAAAboAAAG8czSHHm1heHAAAEPAAAAAIAAAACACnQH4bmFtZQAAQ+AAAADqAAABvCJjP0pwb3N0AABEzAAAAYQAAAIomA5qEXByZXAAAEZQAAABFQAAATrejqJdAAEAAAAMAAAAAAAAAAIAAQAAANwAAQAAAAEAAAAKAAwADgAAAAAAAHjaHceBBsJAGADg778uTgIESAiEAPQMx9g7DCQm0JM22x5n48DnEzi5eYpx+H0VGbZNIMbPe1DQJssIRXg1j84uru4eFgdVb252Vkk1SXp/SSeEugPT/Q0cAAAAeNpjYGZpZ9RhYGVgYJ3FaszAwCgPoZkvMqQxvuFgYuJmZmNmZWFiYmlgYFBnYGBwZoACQ8dgZwYHBgUlITb5fyIMLRy9TBEKDIzzQXIs9qzbgJQCAzMAMHoL+wB42pXKMQgBcRTA4d//GFkwSNLrksliZDY4I3vZM5rtRVnsmZQ6ZS9hsVDMkl4U+6quR1Jm3/
@LeiZeng
LeiZeng / .babelrc
Last active November 8, 2019 18:56
YUI compressor error from babel export default
{
"presets":["es2015"],
"plugins": [
"transform-es3-member-expression-literals",
"transform-es3-property-literals"
]
}
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active December 23, 2024 15:56 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@schickling
schickling / _README.md
Last active January 4, 2024 09:37
Script to import and export docker-machine configurations to sync between hosts/collaborators

docker-machine import/export

Script to import and export docker-machine configurations to sync between hosts/collaborators

Export (on host A)

$ docker-machine ls
NAME       ACTIVE   DRIVER         STATE     URL                            SWARM   DOCKER    ERRORS
dev        -        digitalocean   Running   tcp://example.com:2376                 v1.10.1
@nateyolles
nateyolles / SlingResourceResolutionServlet.java
Created October 9, 2015 04:29
Get the HTML markup for a resource in Apache Sling.
package com.nateyolles.sling;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.sling.SlingServlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
import org.apache.sling.engine.SlingRequestProcessor;
@afolarin
afolarin / docker-log-gist.md
Last active March 16, 2023 13:02
docker-logs
@trekawek
trekawek / brokenLinks.groovy
Created October 4, 2014 07:27
Following groovy script finds broken internal links under the given site
@floriankraft
floriankraft / JcrQueryLibrary.md
Last active June 27, 2025 19:27
Some useful JCR queries (XPATH, SQL2) for AEM/CQ development.

SQL2

All nodes with a specific name

SELECT * FROM [nt:unstructured] AS node
WHERE ISDESCENDANTNODE(node, "/search/in/path")
AND NAME() = "nodeName"

All pages below content path