Skip to content

Instantly share code, notes, and snippets.

View jlgasparrini's full-sized avatar
💎

Leonel Gasparrini jlgasparrini

💎
View GitHub Profile
@ElRodrigote
ElRodrigote / Educación Financiera -101.md
Last active May 14, 2022 16:46
Este archivo contiene una recopilación de información que considero útil para gente que se está metiendo sin conocimiento previos en el mundo de educación financiera e inversiones.

Pasos iniciales que considero necesarios:

  1. Generá una masa crítica (mínimo necesario para que algo sea viable) de plata para invertir. Por definición, la inversión es poner un capital bajo un riesgo de pérdida para intentar obtener un retorno (ganancia), entonces tenés que estar dispuesto a perder esa plata que inviertas, porque puede pasar y es MUY REAL esa posibilidad. Idealmente NO debería pasar porque la idea de invertir es ganar guita, pero puede pasar. O sea no inviertas guita que NECESITES.

  2. Informate. Aprendé qué tipo de inversor sos (conservador, moderado o agresivo; en lineas generales), sé honesto con esto porque tu salud mental está en juego también si no te cuidás, no es joda. La ansiedad y el estrés te pueden coger de parado.

  3. Estudiá para lo que sea que quieras invertir. Si decidís volcarte al trading, estudiá trading. No seas paja. Yo me metí a los cabezazos como un cabrón y la pasé re mal. Estudiá como te sea comodo, pero estudiá. Invertir va de tomar decisiones informadas y e

@tinogomes
tinogomes / pre-commit-complete
Last active March 24, 2021 13:59
Git Hook pre-commit to pass Rubocop and Brakeman on Rails application for validations
#!/bin/sh
#
# Check for ruby style errors
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
NC='\033[0m'
if git rev-parse --verify HEAD >/dev/null 2>&1
@bendc
bendc / supportsES6.js
Created August 25, 2016 08:05
Test if ES6 is ~fully supported
var supportsES6 = function() {
try {
new Function("(a = 0) => a");
return true;
}
catch (err) {
return false;
}
}();
@hsnaydd
hsnaydd / es6-ajax-request.js
Created March 7, 2016 11:52
Es6 Ajax request
export default class Ajax {
get(url, callback) {
let xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
xhr.open('GET', url);
xhr.onreadystatechange = () => {
if (xhr.readyState > 3 && xhr.status === 200) {
callback(xhr.responseText);
}
};
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
@endel
endel / number-pad-zero.js
Last active August 1, 2023 11:54
Simplest way for leading zero padding in JavaScript
Number.prototype.pad = function(size) {
var s = String(this);
while (s.length < (size || 2)) {s = "0" + s;}
return s;
}
(1).pad(3) // => "001"
(10).pad(3) // => "010"
(100).pad(3) // => "100"
@pyratin
pyratin / .vimrc
Last active January 20, 2024 05:37
.vimrc
set nocompatible
filetype off
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-obsession'
Plug 'scrooloose/nerdcommenter'
@zilkey
zilkey / .gitignore
Last active September 14, 2018 20:05
curry example - a way to do dependency injection using lambdas
Gemfile.lock
junk.*
@andrewbranch
andrewbranch / select2-override.css
Last active October 16, 2017 14:04
Flat styling of select2.
.select2-container .select2-choice {
height: 34px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: #fff;
background-image: none;
background: #fff;
}
@henrik
henrik / prawn_stamp.rb
Created February 16, 2012 16:47
Rotate and center text with Prawn as a watermark, e.g. for "[PAID]" on an invoice.
create_stamp("stamp") do
fill_color "cc0000"
text_box "[PAID]",
:size => 2.cm,
:width => bounds.width,
:height => bounds.height,
:align => :center,
:valign => :center,
:at => [0, bounds.height],
:rotate => 45,