Skip to content

Instantly share code, notes, and snippets.

View dariocravero's full-sized avatar

Darío Javier Cravero dariocravero

View GitHub Profile
@daris.local➜ test-grunt-md5 cd builds
@daris.local➜ builds git clone --depth=100 --quiet git://github.com/jney/grunt-md5.git jney/grunt-md5
@daris.local➜ builds git clone --depth=100 --quiet git://github.com/jney/grunt-md5.git jney/grunt-md5
@daris.local➜ builds cd jney/grunt-md5
@daris.local➜ grunt-md5 git:(master) git fetch origin +refs/pull/5/merge:
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 6 (delta 4), reused 5 (delta 3)
Unpacking objects: 100% (6/6), done.
From git://github.com/jney/grunt-md5
// This is the main application configuration file. It is a Grunt
// configuration file, which you can learn more about here:
// https://github.com/cowboy/grunt/blob/master/docs/configuring.md
module.exports = function(grunt) {
'use strict';
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
authorization do
role :guest do
has_permission_on :users, :to => :create
end
role :user do
includes :guest
has_permission_on :users, :to => :manage do
if_attribute :id => is {user.id}
end
$('.ui-dialog').on('keydown', function(ev) {
if (ev.keyCode === $.ui.keyCode.ENTER) {
$('#btnHectaresFormInputConfirm').click();
}
});
ClientInformationTree.prototype.add = function(item) {
var node;
if (item.type == FarmShape.prototype.types.farm) {
var node = this.prepareFarmDataItem(item);
$.tree_reference("ciTree").create(node, "#ciFarms");
} else if (item.type == FarmShape.prototype.types.lot) {
var node = this.prepareLotDataItem(item);
$.tree_reference("ciTree").create(node, "#ciLots" + item.parent.id);
} else if (item.type == FarmShape.prototype.types.path) {
VisualisMap.prototype.fitToBounds = function(bounds) {
// Get the zoom level for that extent.
var zoom = this.openLayers.map.getZoomForExtent(bounds);
// If that value is bigger than the preferred zoom level value. Use
// the preferred one.
if (this.settings.provider == "microsoft" &&
zoom > this.openLayers.maxZoomMicrosoft) {
zoom = this.openLayers.maxZoomMicrosoft;
} else if (this.settings.provider == "google" &&
zoom > this.openLayers.maxZoomGoogle) {
diff --git a/padrino-helpers/lib/padrino-helpers.rb b/padrino-helpers/lib/padrino-helpers.rb
index 0533540..c99ba39 100644
--- a/padrino-helpers/lib/padrino-helpers.rb
+++ b/padrino-helpers/lib/padrino-helpers.rb
@@ -49,6 +49,12 @@ module Padrino
#
def registered(app)
app.set :default_builder, 'StandardFormBuilder'
+ app.set :fingerprinted_assets, {}
+ app.controllers 'fingerprinted-assets' do
class Issue987 < Padrino::Application
register Padrino::Rendering
register Padrino::Mailer
register Padrino::Helpers
use Rack::Protection::EscapedParams
enable :sessions
get :index do
render :index
class Issue987 < Padrino::Application
register Padrino::Rendering
register Padrino::Mailer
register Padrino::Helpers
use Rack::Protection::EscapedParams
enable :sessions
get :index do
render :index
class Issue987 < Padrino::Application
register Padrino::Rendering
register Padrino::Mailer
register Padrino::Helpers
use Rack::Protection::EscapedParams
enable :sessions
get :index do
render :index