Skip to content

Instantly share code, notes, and snippets.

@enzoz
enzoz / gist:4379191
Created December 26, 2012 09:40 — forked from fnando/gist:4356057
#!/usr/bin/env bash
domain=$1
filename="/tmp/$(echo -n "$domain" | md5)"
read -r -d '' screenrc <<SCREENRC
startup_message off
shell /usr/local/bin/bash
autodetach on
defscrollback 10000
def self.compile_subreports(jasper_file)
sub_reports_path = Dir.new File.dirname(jasper_file)
reports_to_compile = sub_reports_path.entries.select { |entry| File.extname(entry) == ".jrxml" }
reports_to_compile.each do |subreport_jrxml_file|
subreport_jasper_file = "#{File.basename(subreport_jrxml_file, '.jrxml')}.jasper"
file_exists = !File.exist?(subreport_jasper_file) || (File.exist?(subreport_jrxml_file)
file_outdated = File.mtime(subreport_jrxml_file) > File.mtime(subreport_jasper_file))
if file_exists && file_outdated
JasperCompileManager.compileReportToFile(subreport_jrxml_file, subreport_jasper_file)
@enzoz
enzoz / hack.sh
Created April 2, 2012 11:57 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#