Public Gists by dmitry

Gravatar
Wed Nov 25 16:42:51 -0800 2009
1
2
set :sync_directories, ["assets", "galleries"]
set :sync_backups, 3
Gravatar
Sun Nov 01 03:24:40 -0800 2009
1
2
3
  self.include_root_in_json = false
 
  def export
Gravatar
Sat Sep 19 06:03:23 -0700 2009
1
2
3
  desc "Moves files to a new :path NB! backup your files before use this task (set CLASS and PATH, ATTACHMENT is optional)"
  task :change_path => :environment do
    raise 'PATH must be specified, like PATH=:rails_root/public/system/:class/:attachment/:style/:id.:extension' if ENV['PATH'].blank?
Gravatar
Thu Sep 17 06:32:41 -0700 2009
1
2
3
before "deploy:rollback:revision", "deploy:rollback_database"
 
  desc "Rolls back database to migration level of the previously deployed release"
Gravatar
Tue Aug 18 06:11:12 -0700 2009
1
2
3
module Dmitry
  module Model
    module ActiveRecord
Gravatar
Thu Jul 23 03:09:55 -0700 2009
1
2
3
var _that = this;
jQuery.extend({
  someFunction: function(onSomeEvent) {
Gravatar
Wed Jul 22 10:59:17 -0700 2009
1
2
3
jQuery.extend({
  // Example: console.log(jQuery.chainSelect('search_location', locations_object, {levels: ['continent', 'country', 'region', 'city', 'suburb']}));
  chainSelect: function(id, json, options) {
Gravatar
Wed Jun 10 05:36:08 -0700 2009
1
2
3
jQuery.fn.extend({
  // upload file through iframe, without refreshing the page, must be wrapped by form
  // jquery.timers dependent
Gravatar
Tue Jun 09 07:53:08 -0700 2009
1
2
3
jQuery.fn.extend({
  // options: width: integer, height: integer, image: string - absolute url path
  // example: $("input[type='file']").stylizeFileInput({width: 79, height: 22, image: '/images/file_button.gif'});
Gravatar
Wed Jan 28 02:11:35 -0800 2009
1
2
3
Creating a Multi Page Form in Rails
 
Creating a multi-step wizard-like form is pretty difficult in Rails.
Gravatar
Tue Dec 02 05:34:03 -0800 2008
1
2
3
# Redefines const value during block execution.
#
# Usage example: