Skip to content

Instantly share code, notes, and snippets.

@yurimorini
yurimorini / git.txt
Created August 17, 2017 09:19
Better Git Log
log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
@yurimorini
yurimorini / ServiceLocator.js
Last active November 24, 2016 19:22
A little plugin concept to create a services container on a Vue instance and let the component to inject only the declared service in their props
function query(Vue, key) {
const service = Vue.$DI[key];
if (service) return service;
throw new Error(`No [${key}] service defined`);
}
export default {
install: function(Vue, options) {
/**