Skip to content

Instantly share code, notes, and snippets.

@jonforums
jonforums / download.rb
Created March 26, 2012 01:15
Ruby HTTP/HTTPS/FTP file downloader
#!/usr/bin/env ruby
# An HTTP/HTTPS/FTP file downloader library/CLI based upon MiniPortile's
# HTTP implementation.
#
# Author: Jon Maken
# License: 3-clause BSD
# Revision: 2012-03-25 23:01:19 -0600
require 'net/http'
require 'net/https' if RUBY_VERSION < '1.9'
@oeloeloel
oeloeloel / ext.c
Last active November 26, 2021 07:11
DragonRuby Pixel Arrays with C Extensions. Quick and Dirty example.
/*
DragonRuby C Extension Pixel Array
Written by @Akzidenz-Grotesk (with help from @AlexDenisov & @Kenneth | CANICVS)
Demonstrates some quick and pretty dirty image filters
Loads image files into Pixel Array
Performs image manipulation every tick
Returns a modified 100x100 pixel image to DragonRuby
*/
#ifndef NULL