Skip to content

Instantly share code, notes, and snippets.

View bluegod's full-sized avatar
Working from home

James Lopez bluegod

Working from home
View GitHub Profile
View gist:fa9fdb4a637df39de246
#One line (command line) solution in Ruby to the Lattice paths problem for a configurable 20x20 frame.
echo "r=20;n=r+20; ((0...r).inject(1) do |m,i| (m * (n - i)) / (i + 1) end)" | irb
bluegod / gist:d0a5ce8eeb82475a843f
Created August 11, 2014 11:07
Backron - filesystem/DB backup script. (old)
View gist:d0a5ce8eeb82475a843f
# Backron - Full and incremental backup script
# Based on a script by Daniel O'Callaghan <>
# Done by James López (BLuEGoD) <bluegod at>
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
bluegod / gist:92528d41deaba36bc64b
Created August 11, 2014 11:06
scanline-fill algorithm written in Ruby (non-recursive version)
View gist:92528d41deaba36bc64b
# Scanline-fill <James.Lopez at>
# GPLv2 License
# I've based this method on:
# Seems the most efficient way as alternatives:
# Recursion: Stack overflow problem
# Pixel by pixel: at least 1 order of magnitude less efficient.