Skip to content

Instantly share code, notes, and snippets.

@hank
hank / gist:198622
Created October 1, 2009 01:07
A totally awesome Ruby script for concatenating files together in columns
#!/usr/bin/ruby
# Original credits to Geet Duggal
# Concatenates an arbitrary number of files together into columns
# Columns map to lines in each file.
# Requirement: Files be of the same length.
# Oh, and cheers!
require "pp"
filez = ARGV.map do |fname|
begin
require 'rubygems'
require 'open-uri'
require 'hpricot'
require 'rss/maker'
version = "2.0"
destination = ENV['HOME']+"/public_html/md_super_ads.xml"
content = RSS::Maker.make(version) do |m|
m.channel.title = "MD Super Ads Classifieds RSS"
@hank
hank / mdshooters_rss.rb
Created August 23, 2009 14:46
Provides code to generate a feed of classified ads
require 'rubygems'
require 'open-uri'
require 'hpricot'
require 'rss/maker'
version = "2.0"
destination = "mdshooters_classifieds.xml"
content = RSS::Maker.make(version) do |m|
m.channel.title = "MDShooters Classifieds RSS"
Stranger: hey
Stranger: you know what
You: WHUT!
Stranger: its DARK outside
You: no wai
Stranger: aint that scary?
You: naa im tough
Stranger: you are :)?
You: like a steak
Stranger: wow
.gist-meta {
font-family: Tahoma,Verdana,"Lucida Grande" !important;
background-color: #FFF !important;
}
.gist-data pre {
color: #222 !important;
}
#include <stdio.h>
int main() {
printf("Look at me, look at me!\n");
return 0;
}