Skip to content

Instantly share code, notes, and snippets.

View jdkanani's full-sized avatar
🎯
Focusing

Jaynti Kanani jdkanani

🎯
Focusing
View GitHub Profile
@granthenke
granthenke / avro.gradle
Created May 17, 2014 03:25
A drop in script to add simple and configurable Avro file compilation support
// A drop in script to add simple and configurable Avro file compilation support
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
classpath([
"org.apache.avro:avro-tools:1.7.4"
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@ziahamza
ziahamza / server.js
Created September 18, 2012 17:37
trivial/simple nodejs document viewer, uses unoconv to convert docs and allows to preview pdf, docx and all libre office supported extentions right from the browser
var http = require('http'),
fs = require('fs'),
path = require('path'),
exec = require('child_process').exec;
function pipeDoc(inputPath, finalType, stream) {
var finalPath = path.dirname(inputPath)
+ "/" + path.basename(inputPath).split('.')[0] + ".html";
var convCommand = 'unoconv -f ' + finalType + " " + inputPath;
exec(convCommand,function(err, stdout, stderr) {