Skip to content

Instantly share code, notes, and snippets.


Eduardo P. Rivero eperedo

View GitHub Profile
brianboyko /
Last active Sep 25, 2020
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.

DawidMyslak /
Last active Sep 22, 2020
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modyfing state object


If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).

Example below explains implications for different implementations.

kottenator / simple-pagination.js
Created Jul 13, 2015
Simple pagination algorithm
View simple-pagination.js
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
justmoon / custom-error.js
Last active Sep 2, 2020 — forked from subfuzion/
Creating custom Error classes in Node.js
View custom-error.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor); =;
this.message = message;
this.extra = extra;
require('util').inherits(module.exports, Error);
matthewlehner / autopgsqlbackup
Created Jul 11, 2012
Auto PostgreSQL backup script.
View autopgsqlbackup
# PostgreSQL Backup Script Ver 1.0
# Copyright (c) 2005 Aaron Axelsen <>
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9
eikes / getTimezone.js
Created Feb 15, 2012
Get or estimate browsers timezone name in JavaScript
View getTimezone.js
var d = new Date();
var usertime = d.toLocaleString();
// Some browsers / OSs provide the timezone name in their local string:
// In other browsers the timezone needs to be estimated based on the offset:
var timezonenames = {"UTC+0":"GMT","UTC+1":"CET","UTC+2":"EET","UTC+3":"EEDT","UTC+3.5":"IRST","UTC+4":"MSD","UTC+4.5":"AFT","UTC+5":"PKT","UTC+5.5":"IST","UTC+6":"BST","UTC+6.5":"MST","UTC+7":"THA","UTC+8":"AWST","UTC+9":"AWDT","UTC+9.5":"ACST"
bentruyman / Custom.css
Created Aug 17, 2011
IR_Black Theme for Chrome Developer Tools
View Custom.css
/* IR_Black Skin by Ben Truyman - 2011
/* Based on Todd Werth's IR_Black:
/* Inspired by Darcy Clarke's blog post:
You can’t perform that action at this time.