Skip to content

Instantly share code, notes, and snippets.

Franco Rondini rondinif

Block or report user

Report or block rondinif

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
@rondinif
rondinif / StatelessCalculator.java
Last active Dec 16, 2015
StatelessCalculator.java
View StatelessCalculator.java
package org.rondadev.samples;
/**
* @author rondadev
*
*/
public class StatelessCalculator {
public double add(double a, double b) {
return a + b;
}
@rondinif
rondinif / StatefulCalculator.java
Created Apr 29, 2013
StatefulCalculator.java
View StatefulCalculator.java
package org.rondadev.samples;
/**
* @author rondadev
*
*/
public class StatefulCalculator {
private StatelessCalculator calculator;
double register = 0;
View sample_app.rb
# singleton-as-module loaded once, kept in memory
module App
module Global extend self
def calc
@calc ||= StatefulCalculator.new
end
end
end
View config.ru
root = File.dirname(__FILE__) # => "."
require File.join( root, 'sample_app' ) # => true
run Sample # ..in sample_app.rb ..class Sample < Sinatra::Base
View Gemfile
source :rubygems
gem 'sinatra'
gem 'warbler'
View gist:5481142
rvm use --create jruby-1.6.7@jruby_sinatra
export JRUBY_OPTS=--1.9
View gist:5486638
@rondinif
rondinif / gist:6628904
Created Sep 19, 2013
Test code for the issue exposed in: (Not able to view ComboBox in Excel using JXL API)[http://stackoverflow.com/questions/18780151/not-able-to-view-combobox-in-excel-using-jxl-api]
View gist:6628904
/*
* Test code for the issue exposed in:
* http://stackoverflow.com/questions/18780151/not-able-to-view-combobox-in-excel-using-jxl-api
* -jar jxl.jar
* [jxl 2.6.12 2009-10-26](http://jexcelapi.sourceforge.net/)
* javac 1.7.0_25
*/
package org.rondakit.jxl.tester;
import java.io.File;
@rondinif
rondinif / gist:9058989
Created Feb 17, 2014
Debugging Mobile Chrome using Desktop Chrome via ADB port forwarding.
View gist:9058989
adb forward tcp:9222 localabstract:chrome_devtools_remote
@rondinif
rondinif / gist:9870604
Created Mar 30, 2014
Come ottenere il nome dell'ultimo file scaricato, come copiare l'ultimo file scaricato in file di lavoro temporaneo.
View gist:9870604
> ls -t ~/Downloads | head -1
LISTA_MOVIMENTI_20140330101644484.csv
> cp `ls -t ~/Downloads | head -1` workfile.csv
You can’t perform that action at this time.