Skip to content

Instantly share code, notes, and snippets.

View royshil's full-sized avatar

Roy Shilkrot royshil

View GitHub Profile
royshil / GDocLaTeXGUI.command
Last active August 29, 2015 13:57
A tiny Tk GUI for compiling GDoc/LaTeX, requires Rob Miller's gdoc2latex (which you can find here:
#!/usr/bin/env python
import Tkinter as tk
import subprocess
import os
class Application(tk.Frame):
def __init__(self, master=None):
tk.Frame.__init__(self, master)
royshil / SoundUtils.cpp
Created October 13, 2014 07:08
This is a simple Qt wrapper around SoundTouch - a very nice Audio Time-Scale library.
* SoundUtils.cpp
* Created on: Oct 9, 2014
* Author: roy_shilkrot
#include <QDebug>
#include <QBuffer>
royshil / OpenCV_Vertical_RLE.cpp
Created January 21, 2015 00:34
Run Length Encoding (vertical) on an OpenCV uchar Mat
#include <opencv2/opencv.hpp>
using namespace cv;
* Compute RLE.
* RLE is encoded in a vector of vectors of (run length, value).
* @param patch_ the 8UC1 image to work on
* @param whichWay by which dimension? rows = 0, columns != 0
This is the Tapestry component to communicate with the javascript
package com.yourpackage.components;
import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.Link;
import org.apache.tapestry5.MarkupWriter;
royshil / gist:7752114
Created December 2, 2013 16:26
Patch for exact-image to support new libPNG
diff --git a/codecs/ b/codecs/
index be70a53..65cee67 100644
--- a/codecs/
+++ b/codecs/
@@ -23,6 +23,12 @@
#include "png.hh" #include "Endianess.hh"
+#define png_infopp_NULL (png_infopp)NULL
+#define int_p_NULL (int*)NULL
+#define png_bytepp_NULL (png_bytepp)NULL
royshil / GDoc LaTex Colorizer
Last active December 30, 2015 09:39
LaTeX Colorizer for Google Documents.Just add it as a script to your GDoc via Tools -> Script Editor (then create a blank script and copy-paste). Don't forget to plug in your GDoc ID in the right place (you can take it right off the URL). Rob Miller's group from CSAIL also created a similar thing:…
function onOpen() {
// Add a menu with items to colorize the whole document or colorize around the cursor only
.addItem('Colorize LaTeX global', 'searchAndReplace')
.addItem('Colorize LaTeX local', 'searchAndReplaceLocal')
* "normalize" the text, remove coloring
royshil / main.cpp
Created December 12, 2013 23:37
Simple HID "driver" for the AIPTEK HyperPen model T-6000U using libHID
* Simple HID "driver" for the AIPTEK HyperPen model T-6000U using libHID
* The MIT License (MIT)
* Copyright (c) 2013 Roy Shilkrot
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
royshil / custom-width-sidebar.html
Created January 27, 2016 12:07
Custom width sidebar with Bootstrap3 container-fluid main
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<link rel="stylesheet" href="">
royshil /
Last active February 20, 2016 16:45
A Tapestry 5 Mixin for a loading spinner with spin.js
package com.yourapp.mixins;
import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.ClientElement;
import org.apache.tapestry5.annotations.Import;
import org.apache.tapestry5.annotations.InjectContainer;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.json.JSONObject;
royshil / circle_of_deadlines.html
Created June 20, 2017 15:59
A d3v4 visualization of yearly submission deadlines (conference, grant, etc). Tool for the hungry assistant professor.
<!DOCTYPE html>
<meta charset="utf-8">
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>