Skip to content

Instantly share code, notes, and snippets.

@kfatehi
kfatehi / _README.md
Created June 5, 2016 03:42
Rebroadcasting an icecast stream to another icecast server with inline transcoding

What?

A one-liner that pulls an AAC stream, pipes it into ffmpeg which transcodes it to mp3, then pipes it into ezstream with your settings (in the xml file) which streams it your radio.

Dependencies

sudo apt-get install ficy ffmpeg ezstream

@ateucher
ateucher / col2hex.R
Created January 6, 2015 21:37
Convert R colours and rgb values to hex
col2hex <- function(colour) {
col_rgb <- t(col2rgb(colour))
rgb2hex(red = col_rgb[,1], green = col_rgb[,2], blue = col_rgb[,3])
}
rgb2hex <- function(red, green, blue, rgbvec = NULL) {
if ((missing(red) || missing(green) || missing(blue)) && is.null(rgbvec)) {
stop("You must supply red, green, and blue OR rgbvec")
}