Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View saten's full-sized avatar

Sante Gennaro Rotondi saten

  • TeamArtist
  • Italy
View GitHub Profile
<div class="modal" id="pleaseWaitDiv" role="dialog" style="display:none"><div class="modal-dialog" data-backdrop="static" data-keyboard="false"><div class="modal-content"><h1>Attendi...</h1><div class="progress progress-striped active"><div class="progress-bar" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;"></div></div></div></div>
@saten
saten / gist:6989855
Created October 15, 2013 10:54
convert erb to haml in subfolders, don't keep sources
Dir[File.join('.','**','*.html.erb')].each {|f| system "html2haml -e #{f} #{f.sub(/erb\Z/,'haml')}; rm #{f} " }
@saten
saten / gist:5801684
Created June 18, 2013 00:17
Italian jquery ui localization file
/* Italian initialisation for the jQuery UI date picker plugin. */
/* Scritta da Sante Rotondi <saten.r@gmail.com> */
jQuery(function($){
$.datepicker.regional['it'] = {
closeText: 'Chiudi',
prevText: 'Precedente',
nextText: 'Successivo',
currentText: 'Oggi',
monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
@saten
saten / quick_route_tester.rb
Created August 17, 2012 09:29
Enumerates routed controllers and actions and checks if they exist in the code (simple and quick, without corner cases). Tested on Rails 3.2.8
Rails.application.eager_load!
all_routes = Rails.application.routes.routes
controllers=ApplicationController.descendants
#controller_names = controllers.collect {|c| c.to_s.underscore.sub('_controller','') }
controller_names={}
controllers.each {|c|
controller_names[c.to_s]=c.to_s.underscore.sub('_controller','')
}.size