Skip to content

Instantly share code, notes, and snippets.

View millisami's full-sized avatar
🎯
Focusing on landing a Web3 Job

Sachin Sagar Rai millisami

🎯
Focusing on landing a Web3 Job
View GitHub Profile
Rails CMS alternatives
======================
Note: project activity was checked on 11/26/09.
Active projects:
---------------
adva-cms
repo: http://github.com/svenfuchs/adva_cms/
site: http://adva-cms.org/
Last update: 11/24/09
# Put this in config/initializers/date_time_format.rb
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(
:short => lambda { |time| time.strftime("%b #{time.day.ordinalize}, %Y - %H:%M") }
)
# To use this time format do:
DateTime.now.to_s(:short)
@millisami
millisami / tinyurl.rb
Created December 27, 2009 05:22 — forked from woods/tinyurl.rb
#!/usr/bin/env ruby
#
# A complete URL-shortening web application, written in Ruby/Sinatra. Run it
# from the command line, and then visit http://localhost:4567/
#
# Or to run it under apache/passenger, you'll need a config.ru file with the
# following contents:
#
# require 'tinyurl'
# run Sinatra::Application
##formtastic_datepicker_interface
module Formtastic
module DatePicker
protected
def datepicker_input(method, options = {})
format = options[:format] || ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS[:default] || '%d %b %Y'
string_input(method, datepicker_options(format, object.send(method)).merge(options))
end
NoMethodError in VendorsController#new
undefined method `build' for nil:NilClass
RAILS_ROOT: /home/millisami/rails_apps/automation
Application Trace | Framework Trace | Full Trace
/home/millisami/.rvm/gems/ree-1.8.7-2010.01/gems/activesupport-2.3.5/lib/active_support/whiny_nil.rb:52:in `method_missing'
/home/millisami/.rvm/gems/ree-1.8.7-2010.01/gems/actionpack-2.3.5/lib/action_controller/base.rb:1331:in `send'
/home/millisami/.rvm/gems/ree-1.8.7-2010.01/gems/actionpack-2.3.5/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
#!/usr/bin/env ruby
##
# Originally from http://www.pragmaticautomation.com/cgi-bin/pragauto.cgi/Monitor/StakingOutFileChanges.rdoc
# Modified by Geoffrey Grosenbach http://peepcode.com
#
# Watches files and runs a command when any of them are modified.
#
# If one argment is given, will run that command and watch app, lib, test, spec.
#
<?xml version="1.0"?>
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.10-macosx">
<Machine uuid="{0f0eb78b-a216-46c7-aa11-0ce613a5330c}" name="vagrantbase_1" OSType="Ubuntu" lastStateChange="2010-06-14T20:50:49Z">
<Hardware version="2">
<CPU count="1" hotplug="false">
<HardwareVirtEx enabled="true" exclusive="false"/>
<HardwareVirtExNestedPaging enabled="true"/>
<HardwareVirtExVPID enabled="true"/>
<PAE enabled="true"/>
</CPU>
VirtualBox 3.2.4 r62467
Host: Snow Leopard 10.6.3
Guest: Ubuntu
ruby-1.9.1-p378@rails3 [~/codes/rails_test_box (master)⚡] ➔ bundle exec vagrant up
[default] Creating VM 'default'
[default] Provisioning enabled with Vagrant::Provisioners::ChefSolo
[default] Importing base VM (/Users/millisami/.vagrant/boxes/rails-test-box/box.ovf)...
[default] Persisting the VM UUID (0f0eb78b-a216-46c7-aa11-0ce613a5330c)...
ree-1.8.7-2010.02 [~/tmp] ➔ rvm --trace default
--trace default
rvm 0.1.38 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
+ [[ -z '' ]]
+ [[ ! -z ree-1.8.7-2010.02 ]]
+ rvm_action=use
+ [[ ! -z '' ]]
+ [[ ! -z '' ]]
system:
system:
uname: "Darwin millisami.local 10.3.1 Darwin Kernel Version 10.3.1: Thu Feb 11 13:26:12 PST 2010; root:xnu-1504.3.51~4/RELEASE_I386 i386"
shell: "bash"
version: "3.2.48(1)-release"
rvm:
version: "rvm 0.1.38 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]"