gem install rails --pre
rails new my_app -T
| -- Get Max ID from table | |
| SELECT MAX(id) FROM table; | |
| -- Get Next ID from table | |
| SELECT nextval('table_id_seq'); | |
| -- Set Next ID Value to MAX ID | |
| SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| inputs = %w[ | |
| CollectionSelectInput | |
| DateTimeInput | |
| FileInput | |
| GroupedCollectionSelectInput | |
| NumericInput | |
| PasswordInput | |
| RangeInput | |
| StringInput | |
| TextInput |
| require 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/rbenv' # for rbenv support. (http://rbenv.org) | |
| # require 'mina/rvm' # for rvm support. (http://rvm.io) | |
| # Basic settings: | |
| # domain - The hostname to SSH to. | |
| # deploy_to - Path to deploy into. | |
| # repository - Git repo to clone from. (needed by mina/git) |
| require 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/rbenv' # for rbenv support. (http://rbenv.org) | |
| # require 'mina/rvm' # for rvm support. (http://rvm.io) | |
| # Basic settings: | |
| # domain - The hostname to SSH to. | |
| # deploy_to - Path to deploy into. | |
| # repository - Git repo to clone from. (needed by mina/git) |
| // Instructions: | |
| // (1) Browse to your favorite Trello board | |
| // (2) Drop this into your friendly Chrome inspector or Firefox Firebug console | |
| $('.list').each(function(index) { | |
| var outer = $(this); | |
| $(this).find('h2.current').each(function(index) { | |
| $(this).text($(this).text() + " (" + outer.find('.list-card').length + ")"); | |
| }) | |
| }) |
| set :shared_children, shared_children << 'tmp/sockets' | |
| namespace :deploy do | |
| desc "Start the application" | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && RAILS_ENV=#{stage} bundle exec puma -b 'unix://#{shared_path}/sockets/puma.sock' -S #{shared_path}/sockets/puma.state --control 'unix://#{shared_path}/sockets/pumactl.sock' >> #{shared_path}/log/puma-#{stage}.log 2>&1 &", :pty => false | |
| end | |
| desc "Stop the application" | |
| task :stop, :roles => :app, :except => { :no_release => true } do |
| // | |
| // FileUpload.j | |
| // Editor | |
| // | |
| // Created by Francisco Tolmasky on 03/04/08. | |
| // Copyright 2005 - 2008, 280 North, Inc. All rights reserved. | |
| // | |
| import <Foundation/CPObject.j> | |
| import <Foundation/CPValue.j> |
| // | |
| // FileUpload.j | |
| // Editor | |
| // | |
| // Created by Francisco Tolmasky on 03/04/08. | |
| // Copyright 2005 - 2008, 280 North, Inc. All rights reserved. | |
| // | |
| import <Foundation/CPObject.j> | |
| import <Foundation/CPValue.j> |