Skip to content

Instantly share code, notes, and snippets.

View edgarv09's full-sized avatar

Edgar Villamarin edgarv09

View GitHub Profile
@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 / 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