Skip to content

Instantly share code, notes, and snippets.

View rodrigore's full-sized avatar

Rodrigo Guzmán rodrigore

  • Santiago, Chile
View GitHub Profile
" vim:fdm=marker
" Vim-Plug {{{
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
@rodrigore
rodrigore / github_score.md
Last active January 12, 2021 16:01
Ejercicio github score

Version 1

##Calculo del puntaje de GitHub de algun usuario

Dado un archivo JSON que contiene la información de un usuario de GitHub, determinar su puntaje en base a los tipos de eventos que ha realizado en la plataforma.

Los eventos que se deben considerar, con el respectivo puntaje son:

  • PushEvent: Otorga 5
  • CreateEvent: Otorga 4
@rodrigore
rodrigore / MoneyCalculator.js
Created May 9, 2013 17:14
Solución al problema de efectuar operaciones (solamente suma en este caso) entre dos tipos de monedas, haciendo uso de Javascript y Jasmine. La clase MoneyCalculator contiene el metodo *sum* que permiten operar entre dos objetos, cuyas propiedades son *monto* y *moneda*. La clase MoneyCalculator recibe como parametro un objeto *exchangeService* …
var MoneyCalculator = function (exchangeService) {
this.sum = function (a, b) {
if (a.currency !== b.currency) {
b.amount = exchangeService.convert(b, a.currency);
}
return {
"amount" : a.amount + b.amount,
"currency" : a.currency
};
@rodrigore
rodrigore / gist:3084893
Created July 10, 2012 17:28
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@rodrigore
rodrigore / gist:2967148
Created June 21, 2012 17:21 — forked from shrwnsan/gist:2860805
Sublime Text 2 - Fetch Settings
{
"files":
{
"jquery" : "http://code.jquery.com/jquery.js",
"jquery.min" : "http://code.jquery.com/jquery.min.js",
"jquery-cookie" : "https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js",
"jquery-dotimeout" : "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.js",
"jquery-extra-selectors" : "https://raw.github.com/keithclark/JQuery-Extended-Selectors/master/jquery-extra-selectors.js",
"jquery-flexslider" : "https://raw.github.com/mbmufffin/FlexSlider/master/jquery.flexslider-min.js",
"jquery-mediaelement" : "https://raw.github.com/johndyer/mediaelement/master/build/mediaelement-and-player.js",