Skip to content

Instantly share code, notes, and snippets.

@camelaissani
camelaissani / about.html
Created July 6, 2017 00:02
create a template url-routing script
<p>This is the content of the about page </p>
@camelaissani
camelaissani / encode-uri-object.js
Created July 1, 2017 10:45
Javascript implementation of JQuery.param() $.param
function encodeURIObject = (obj, branch=[], results=[]) => {
if (obj instanceof Object) {
Object.keys(obj).forEach(key => {
const newBranch = new Array(...branch);
newBranch.push(key);
encodeURIObject(obj[key], newBranch, results);
});
return results.join('&');
}
@camelaissani
camelaissani / index.html
Last active December 21, 2017 10:25 — forked from aldebaran798/index.html
FrontExpress Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://cdn.jsdelivr.net/npm/frontexpress@1.1.0/frontexpress.min.js"></script>
<title>Prueba Front Express</title>
</head>
<body>
Probando <br />
<a class="menu-item" data-id="page1" href="#"> page 1</a>
@camelaissani
camelaissani / rmdir-recursive.js
Last active December 27, 2016 21:08
Makes a recursive rmdir in nodejs
var fs = require('fs');
function rmdirSync(dir) {
var currentDirToRead,
directoriesFound,
nextDirToReadIndex;
if (!fs.existsSync(dir)) {
return;
}