This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove old version of merb | |
sudo gem search --no-version merb | grep merb | xargs sudo gem uninstall -a | |
# Install only few gems of merb! | |
sudo gem install merb-core merb-action-args merb-assets merb-cache merb-exceptions merb-gen merb-haml merb-helpers merb-mailer merb-param-protection merb_activerecord |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an idea how it might become Lipsiadmin Grids in the future. | |
# In particular we focused to bring them into reusable on other pages. | |
def grid | |
grid = Ext.grid "List of all accounts" do |grid| | |
#Some standard config | |
grid.append "/backend/accounts/store.js" # or :controller => :accounts, :action => :store, :format => :js | |
grid.selection :checkbox | |
grid.grouped true, "accounts.name"# true is default | |
# Render: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Aggiornamento iniziale server Fedora 10 64bit | |
rm -rf ~/upgrading | |
echo "Eseguo gli aggiornamenti e pulisco la cache" | |
yum update -y && yum clean all | |
echo "Eseguo ancora una volta gli aggiornamenti e pulisco la cache" | |
yum update -y && yum clean all | |
echo "Creo la directory di upgrade" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Configurazione iniziale server Fedora 10 64bit | |
clear | |
echo "----------------------------------------------------" | |
echo "--------------Configurazione Fedora 10--------------" | |
echo "----------------------------------------------------" | |
echo | |
echo -n "Vuoi modificare il messaggio di login? (y/n): "; read ans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var selProductsGroupingView = new Ext.grid.GroupingView({ | |
forceFit: true | |
}); | |
var selProductsToolbar = new Ext.Toolbar(); | |
var selProductsCheckboxSelectionModel = new Ext.grid.CheckboxSelectionModel(); | |
var selProductsGroupingStore = new Ext.data.GroupingStore({ | |
reader: new Ext.data.JsonReader({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An advanced grid | |
# | |
# products_controller.rb | |
def show | |
params[:limit] ||= 50 | |
# Our conditions | |
conditions = "products.store_id = #{current_store.id}" | |
conditions += " AND warehouses.id IN (#{current_account.warehouseship_ids.join(",")})" if current_account.magazziniere? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :admin do | |
get :show do | |
... | |
end | |
end | |
namespace :frontend do | |
get :index do | |
... | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Attempts to require all dependencies with bundler | |
begin | |
require 'bundler' | |
Bundler::Environment.load(root_path + "/Gemfile").require_env(RACK_ENV) | |
rescue Bundler::DefaultManifestNotFound => e | |
puts "You didn't create Bundler Gemfile manifest or you are not in a Sinatra application." | |
end | |
# Attempts to load budled gems if it fail we try to use system wide gems | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppExample < AppBase | |
set :app_name, "app_example" | |
bootstrap! | |
end |
OlderNewer