Skip to content

Instantly share code, notes, and snippets.

View vitaliel's full-sized avatar

Vitalie Lazu vitaliel

  • Moldova, Chisinau
View GitHub Profile
link_to_remote("Post a comment", :update => "wiki-comment-form", :url => {:action => "show_add_comment", :id => @space, :wiki_id => @wiki_version},
:before => visual_effect(:appear, "load_dots", :queue => 'end'),
:complete => visual_effect(:fade, "load_dots") + visual_effect(:fade, 'flows-w') + visual_effect(:appear, 'wiki-comment-form', :queue => 'end'))
encodeURIComponent(location.href)
Form.getInputs(form, 'radio', name).each(function(input) {
if (input.value == value) {
input.checked = true
#!/usr/bin/env ruby
#
# Author: Vitalie Lazu <[email protected]>
# Date: Sat, 10 Jan 2009 19:12:43 +0200
#
# CLI ruby client for Tracks: rails application for GTD methodology
# http://www.getontracks.org/development/
# You need to set ENV['GTD_LOGIN'], ENV['GTD_PASSWORD']
# Author: Vitalie Lazu
# Date: Mon, 01 Dec 2008 14:28:28 +0200
# Rake tasks to help you with family photos:
# * Download photos from camera
# * Arrange photos in folders by date like digikam,
# * Rotate them according exif information
#
# Setup to use this tasks:
# apt-get install rubygems imagemagick gphoto2 rake
#!/usr/bin/env ruby
require 'net/http'
require 'optparse'
require 'timeout'
require 'cgi'
# Source: http://pastie.org/98642
# Post code for review
require 'rubygems'
require 'roo'
s = Excel.new("price-dd.xls")
s.default_sheet = s.sheets.first
#puts s.info
i = s.first_row
#!/usr/bin/env ruby
# $File: apache_status_parser.rb $
# Created by Vitalie Lazu on Mon, 05 Nov 2007 20:28:57 +0200
# Using hpricot to parse apache server status and kill processes that takes too much time to complete
#
# Debian/Ubuntu setup:
# apt-get install rubygems
# gem install hpricot --no-ri --no-rdoc