Skip to content

Instantly share code, notes, and snippets.

View helloIAmPau's full-sized avatar
👾
git commit -m 'setting status'

Pasquale Boemio helloIAmPau

👾
git commit -m 'setting status'
View GitHub Profile
@helloIAmPau
helloIAmPau / gist:9991579
Created April 5, 2014 12:52
One-shot random string in javascript
Math.random().toString(36).replace('0.','')
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@helloIAmPau
helloIAmPau / linux.profile
Last active August 29, 2015 14:15
Linux Profile for TexLive installation
# texlive.profile written on Sun Nov 30 13:02:13 2014 UTC
# It will NOT be updated and reflects only the
# installation profile at installation time.
selected_scheme scheme-custom
TEXDIR /home/travis/build/helloIAmPau/curriculum-vitae/tl
TEXMFCONFIG ~/.texlive2014/texmf-config
TEXMFHOME ~/texmf
TEXMFLOCAL /home/travis/build/helloIAmPau/curriculum-vitae/texmf-local
TEXMFSYSCONFIG /home/travis/build/helloIAmPau/curriculum-vitae/texmf-config
TEXMFSYSVAR /home/travis/build/helloIAmPau/curriculum-vitae/texmf-var
@helloIAmPau
helloIAmPau / incremental-dom-template.js
Created June 26, 2018 23:38
Experimenting with incremental-dom framework. This is a parser that converts an HTML template into an incremental-dom template. This supports loops and conditions too.
var htmlparser = require("htmlparser2");
let spaces = 0;
const nodes = {
'dom-loop': function(name, attribs) {
return `for(const current of ${ attribs.items.trim().slice(2, -1).trim() }) {`;
},
'dom-if': function(name, attribs) {
return `if(${ attribs.test.trim().slice(2, -1).trim() }) {`;
},