Skip to content

Instantly share code, notes, and snippets.

@tuler
tuler / factory.ts
Last active August 21, 2023 22:06
Factories and interfaces
interface IShape {}
class Shape implements IShape {}
// Option A
interface IShapeFactory {
create(): Shape;
}
// Option B
interface IShapeFactory {
@tuler
tuler / .block
Last active April 3, 2016 05:40 — forked from mbostock/.block
Zoom to Bounding Box II
license: gpl-3.0
@tuler
tuler / affirmation
Created July 29, 2014 00:06
MuleSoft Contributor Agreement Acceptance by Danilo Tuler
I, Danilo Tuler, have read and do accept the MuleSoft Contributor Agreement
at http://www.mulesoft.org/legal/contributor-agreement.html
Accepted on Mon Jul 28 2014 21:06:00 GMT-0300 (BRT)
@tuler
tuler / strip
Created June 5, 2013 11:15
groovy script to generate a film strip
@Grab( 'commons-io:commons-io:2.1' )
import org.apache.commons.io.FilenameUtils
// filename of video
def filename = this.args[0]
// base of filename
def basename = FilenameUtils.getBaseName(filename)
// width of final strip
@tuler
tuler / thumbnail_xuggler
Created June 5, 2013 11:14
Script to generate video thumbnails using xuggler
@GrabResolver(name='xuggle', root='http://xuggle.googlecode.com/svn/trunk/repo/share/java/')
@Grab( 'xuggle:xuggle-xuggler:5.2' )
import javax.imageio.ImageIO;
import java.io.File;
import java.awt.image.BufferedImage;
import com.xuggle.xuggler.Global;
import com.xuggle.xuggler.IContainer;
import com.xuggle.xuggler.IPacket;
@tuler
tuler / redmine_svn_to_git_migrator.rb
Created May 5, 2012 04:31 — forked from rca/redmine_svn_to_git_migrator.rb
Redmine SVN to Git Migrator
#!/usr/bin/ruby
#
# Migration Tool for Redmine issue and time entry comments from SVN revisions to Git (i.e. r1234 => commit:abcdef789)
# ==============================
# (c) 2009 Christoph Olszowka & Sebastian Georgi, Capita Unternehmensberatung
#
# We used this when we migrated two of our main repositories from svn to git (see http://gist.github.com/139478)
# and wanted to have our revision links in Redmine reflect that change, too.
#