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 |
View gist:d0a5ce8eeb82475a843f
#!/bin/sh | |
# Backron - Full and incremental backup script | |
# Based on a script by Daniel O'Callaghan <danny@freebsd.org> | |
# Done by James López (BLuEGoD) <bluegod at bluegod.net> | |
# | |
# 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. | |
# |
View gist:92528d41deaba36bc64b
# Scanline-fill <James.Lopez at bluegod.net> | |
# GPLv2 License | |
# I've based this method on: | |
# http://en.wikipedia.org/wiki/Flood_fill#Scanline_fill | |
# Seems the most efficient way as alternatives: | |
# Recursion: Stack overflow problem | |
# Pixel by pixel: at least 1 order of magnitude less efficient. | |
# | |
# https://github.com/bluegod/scanlinefill |