Skip to content

Instantly share code, notes, and snippets.

tomer doron tomerd

Block or report user

Report or block tomerd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tomerd
tomerd / gauge.js
Last active Sep 17, 2019
google style gauges using javascript d3.js
View gauge.js
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var self = this; // for internal d3 functions
this.configure = function(configuration)
{
this.config = configuration;
@tomerd
tomerd / gist:4179337
Created Nov 30, 2012
init.d script to control resque + resque-scheduler with rvm and bundler
View gist:4179337
#!/bin/sh
#
# chkconfig: - 85 15
# Source function library.
. /etc/rc.d/init.d/functions
ROOT="app_path"
USER="user"
ENVIRONMENT="development"
@tomerd
tomerd / LessSimpleHtmlSanitizer.java
Created Dec 19, 2011
a less simple HtmlSanitizer
View LessSimpleHtmlSanitizer.java
public final class LessSimpleHtmlSanitizer implements HtmlSanitizer
{
private static final String[] SIMPLE_TAGS = {"b", "em", "i", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "br", "ul", "ol", "li", "img"};
private static final String[] CONTAINER_TAGS = {"html", "body", "table", "tbody", "tfoot", "th", "tr", "td", "p", "div", "span", "pre"};
public SafeHtml sanitize(String html)
{
return sanitizeHtml(html);
}
You can’t perform that action at this time.