Skip to content

Instantly share code, notes, and snippets.

View jgermade's full-sized avatar
🎨
Working from home

Jesús Germade jgermade

🎨
Working from home
View GitHub Profile
function delayed (fn, args) {
var _this = this, _args = args || arguments;
setTimeout(function () {
fn.apply(_this, _args);
}, 0);
}
function once (fn, nextValue) {
var result, hasNextValue = arguments.length > 1;
return function () {
function compileMessage (message) {
return new Function('obj', 'with(obj){ return \'' +
message.replace(/\n/g, '\\n').split(/{{([^{}]+)}}/g).map(function (expression, i) {
return i%2 ? ( '\'+(' + expression.trim() + ')+\'' ) : expression;
}).join('') +
'\'; }');
}
{
"host": "location",
"toc": true,
"merchant": {
"confirmation_url": "http://checkout.ovh2.germade.es/success.html",
"cancel_url": "/demo-cancel.html",
"success_url": "/demo-success.html"
},
"customer": {
"id": "140",
var arrayShift = [].shift;
function _deep_merge (dest, src) {
if( typeof dest !== typeof src ) {
return src;
}
if( src instanceof Array ) {
[].push.apply(dest, src);
return dest;
}
.tree-view {
font-family: 'Souce Sans Pro', 'Ubuntu Mono', Monaco, monospace;
font-size: 17px !important;
.list-tree .entry {
line-height: 1.5;
.name {
color: #aaa;
}
{
"toc": true,
"merchant": {
"confirmation_url": "https://demo.aplazame.com/confirm",
"cancel_url": "/demo-cancel.html",
"success_url": "/demo-success.html"
},
"customer": {
"id": "140",
"email": "[email protected]",
{
"toc": true,
"merchant": {
"confirmation_url": "https://demo.aplazame.com/confirm",
"cancel_url": "/demo-cancel.html",
"success_url": "/demo-success.html"
},
"customer": {
"id": "140",
"email": "[email protected]",
{
"toc": true,
"merchant": {
"confirmation_url": "https://demo.aplazame.com/confirm",
"cancel_url": "/demo-cancel.html",
"success_url": "/demo-success.html"
},
"customer": {
"id": "140",
"email": "[email protected]",
@jgermade
jgermade / node-release.sh
Last active May 6, 2017 00:42
node-release.sh
#!/bin/sh
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
echo "npm version patch"
git pull --tags
npm version patch
git push origin ${GIT_BRANCH}
git push --tags
function Father(first_name) {
this.first_name = name;
}
var John = new Father('John');
function Son() {
Father.apply(this, arguments);
}