Skip to content

Instantly share code, notes, and snippets.

View sunjay's full-sized avatar
🔍
Looking for answers so I can share them with the world

Sunjay Varma sunjay

🔍
Looking for answers so I can share them with the world
View GitHub Profile
@nathamanath
nathamanath / data_uri.rs
Last active November 17, 2016 14:52
rust image to data uri
extern crate rustc_serialize;
extern crate regex;
use rustc_serialize::base64::{ToBase64, MIME};
use rustc_serialize::hex::{ToHex};
use std::path::Path;
use std::env;
use std::fs::File;
use std::io::Read;
use regex::Regex;