Skip to content

Instantly share code, notes, and snippets.

View Bellfalasch's full-sized avatar

Bobby Westberg Bellfalasch

View GitHub Profile
@Bellfalasch
Bellfalasch / ec6.js
Created March 25, 2019 10:05
JavaScript EC6 test
var data = [{
"firstName": "Loraine",
"lastName": "Rosenzveig",
"gender": "Female"
}, {
"firstName": "Shandeigh",
"lastName": "Pomroy",
"gender": "Female"
}, {
"firstName": "Skipper",

Handy sets of Regex to perform effective search-and-replace / reorganizations in big HTML files.

Find chunks of HTML and reorganize them:

		<content:encoded><!\[CDATA\[<div class="sidebar">
([\s\S]*?)
<h2>Taktik</h2>
<p>([\s\S]*?)</p>\]\]></content:encoded>
@Bellfalasch
Bellfalasch / build.gradle
Last active February 19, 2016 12:23
Example Gradle settings that minifies JS and CSS into all.js and main.css
buildscript {
repositories {
mavenLocal()
jcenter()
maven {
url 'http://repo.enonic.net/public'
}
}
dependencies {
<div class="block" id="block3">
<div
data-750-top="margin-left:-400px; width:100px;"
data-top="margin-left:0px; width:500px;"
>
<!-- Empty ^^ -->
</div>
<div
data-400-top="background-color:hsla(255,70%,100%,0.1)"
data-top="background-color:hsla(255,100%,100%,1.0)"
<div class="block" id="block2">
<div
data-600-top="width:100px; height:100px; background-color:red;"
data-300-top="width:300px; height:300px; margin-top:0px;"
data-top="margin-top:300px;"
>
<!-- Empty ^^ -->
</div>
</div>
<div class="block" id="block1"
data-start="padding-left:20px;"
data-500-start="padding-left:400px;"
>
<div class="block" id="block1">
<p>Some text that we will try and animate in a cool and easy way!</p>
</div>
<div class="block" id="block2">
<!-- Code comes later -->
</div>
<div class="block" id="block3">
<!-- Code comes later -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
<title>Let’s test Skrollr!</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
<title>Let’s test Skrollr!</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
@Bellfalasch
Bellfalasch / module.xml
Created June 29, 2015 13:23
/module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module>
<display-name>Your module name</display-name>
<info>Short explanation</info>
<url>http://enonic.com</url>
<vendor>
<name>Enonic AS</name>
<url>http://www.enonic.com</url>
</vendor>
<dependencies system-min-version="5.0.0" system-max-version="6.0.0"/>