Transition guide (Feb 2012) ggplot2
download
my personal notepad - for all the things I used to write on pieces of paper ( which where never seen again esp. when I needed them ) ...
Saturday, April 28, 2012
ggplot2 transition guide (feb 2012)
Monday, April 16, 2012
Convert ERb into HAML (via rake)
install these gems:
haml-rails
ruby_parser
hpricot
now run rake
and don't forget that its not rake erb2html, its rake erb2haml!
From:
here
PS:
gem 'ruby_parser'
gem 'hpricot'
haml-rails
ruby_parser
hpricot
#./lib/tasks/erb2haml.rake desc "Creates haml files for each of the erb files found under views (skips existing)" task :erb2haml do from_path = File.join(File.dirname(__FILE__), '..', '..', 'app', 'views') Dir["#{from_path}/**/*.erb"].each do |file| puts file # for each .erb file in the path, convert it & output to a .haml file output_file = file.gsub(/\.erb$/, '.haml') `bundle exec html2haml -ex #{file} #{output_file}` unless File.exist?(output_file) end end
now run rake
and don't forget that its not rake erb2html, its rake erb2haml!
From:
here
PS:
gem 'ruby_parser'
gem 'hpricot'
Sunday, April 15, 2012
set up git for the first use (with rails)
After installing the packages git-core and gitosis:
configure
run
customize the
examples here
add your project to git
to see which files are in the staging area:
to tell Git you want to keep the changes
list of commit messages:
undo changes
configure
git config --global user.name "username" git config --global user.email "user@mail.com" git config --global core.editor "emacs -w"
run
git init
customize the
.gitignore
fileexamples here
add your project to git
git add . ## from your project folder
to see which files are in the staging area:
git status
to tell Git you want to keep the changes
git commit -m "initial commit"
list of commit messages:
git log
undo changes
git checkout -f ## -f flag to force overwriting the current changes
Saturday, April 14, 2012
Subscribe to:
Posts
(
Atom
)