Skip to content

Instantly share code, notes, and snippets.

View pablox-cl's full-sized avatar

Pablo Olmos de Aguilera Corradini pablox-cl

View GitHub Profile
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@pablox-cl
pablox-cl / csv2yaml.rb
Created November 7, 2010 17:14 — forked from reservationlive/Ruby script to convert CSV to YAML
Simple Ruby CSV to YAML converter
#!/usr/bin/env ruby
#
# Originally written by http://redartisan.com/tags/csv
# Added and minor changes by Gavin Laking
#
# "id","name","mime_type","extensions","icon_url"
# "1","unknown","unknown/unknown","||","/images/icon/file_unknown.gif"
# "2","image/tiff","image/tiff","|tiff|tif|","/images/icon/blank.png"
#
# if you want to remove the id: "number" line from the resulting YAML file