Skip to content

Instantly share code, notes, and snippets.

View edgarv09's full-sized avatar

Edgar Villamarin edgarv09

View GitHub Profile
@edgarv09
edgarv09 / gemasUtilesRubyRails2019.md
Last active October 14, 2020 19:08
Gemas y utilidades para rails
@edgarv09
edgarv09 / rails http status codes
Created October 21, 2019 19:09 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@edgarv09
edgarv09 / VelToJSON
Created April 2, 2020 23:31 — forked from narenranjit/VelToJSON
Convert objects in Velocity templates to JSON
#macro(VelListToJSON $list )
#set($myList = $list )## dereference
{
#foreach($key in $myList.keySet())
"$key":
#set($x = $myList.get($key))
#VelToJSON($x)
#if($foreachCount != $myList.keySet().size()) , #end
#end
}
@edgarv09
edgarv09 / railsconsoleHelpers.md
Created January 6, 2021 15:06
render in rails console

initial setup

view_paths = Rails::Application::Configuration.new(Rails.root).paths["app/views"] av_helper = ActionView::Base.new view_paths

(Optional) include this if your partial uses route helpers:

include Rails.application.routes.url_helpers

av_helper.render "path/to/your/partial"

@edgarv09
edgarv09 / builders.csv
Last active March 25, 2021 23:55
builders.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
id,name,number_of_real_estates,start_operation_date,number_of_projects_built,average_building_time,price_range,trust_fund,associated_trust_funds,overseeing_entity,picture,extra_data,country_id,created_at,updated_at,slug,legal_id_number,logo
3,Londoño Gómez Propiedad Raíz,19,1971-01-01,178,"15,9",De $219 a 2113 Millones,Más de el 33% de sus proyectos recibe FNA,"Alianza fiduciaria, Credicorp Capital, entre otras.","Secretaría Distrital de Hábitat, en su mayoría manejan Fiducias.",NULL,{},1,2021-03-18 17:39:11.549023,2021-03-18 17:39:11.549032,NULL,NULL,NULL
4,Bienes & Bienes S.A,16,1991-01-01,86,16,De $193 a 525 Millones,Más de el 31% de sus proyectos recibe FNA,"Bancolombia, Caja Social, Alianza Fiduciaria, entre otras.","Secretaría Distrital de Hábitat, en su mayoría manejan Fiducias.",NULL,{},1,2021-03-18 17:39:11.549023,2021-03-18 17:39:11.549032,NULL,NULL,NULL
5,Capital,16,1993-01-01,160,12 a 16,De $122 a 655 Millones,Más de el 28% de sus proyectos recibe FNA,"Colmena, Banco Amigo bancolombia, Fid. Bogotá
@edgarv09
edgarv09 / .zshrc
Last active August 8, 2022 16:14
my zsh script
# Color formatting
PROMPT="%F{14}%n%f@:%F{11}%1d%f$ "
alias ls='ls -GFh'
alias la_haus="cd <APP>"
alias l='ls -lah'
alias lh_wp="<APP>/webpack-dev-server"
alias lh_db="docker-compose -f docker-compose.yml up -d"
alias rubo="rubocop --safe-auto-correct"
export GPG_TTY=$(tty)