Skip to content

Instantly share code, notes, and snippets.

@umjasnik
umjasnik / fs_to_json.js
Last active August 29, 2015 13:55
ringojs, list directory recursevely and return result as json
/**
* usage: ringo fs_to_json.js
* ringo fs_to_json.js path
* ringo fs_to_json.js path outputfile
* result:
* [{"name":"filename"},{"name": "directoryname", files:[]}]
*/
var system = require("system");
var fs = require("fs");
@umjasnik
umjasnik / Sql.rl
Created December 27, 2011 20:06
simple SQL parser using ragel - get all tables that are referenced in a SQL statement
package de.uwefleischer.statemachines;
import java.util.Set;
import java.util.TreeSet;
public class Sql {
private static Set<String> tables;
%%{