February 2012
2 posts
2 tags
Weekly #2
Weekly round-up of Ruby and Rails related news and articles.
ROFLBALT - First of all, CANABALT is an awesome game (I wasn’t aware of CANABALT until I read this post and you should try it. Too bad they didn’t create it on Android) and ROLFBALT is a Ruby port of it. Reading their code makes me wonder how should I write unit tests for a game application?
browsernizer - Rack middleware...
5 tags
Weekly #1
Weekly round-up of Ruby and Rails related news and articles.
A Chat with Nick Quaranto - Ever wonder how rubygems.org internal looks like?
TorqueBox - A new kind of Ruby application platform that integrates Ruby on Rails. Built upon JBoss AS Java application server. Functionality such as clustering, load-balancing and high-availability is included right out-of-the-box
Vim for Rails developers
December 2011
2 posts
1 tag
One of Ruby's better-kept secrets: how to get... →
Here’s how
require 'tmpdir'
puts Dir.tmpdir
1 tag
How to add working directory to $LOAD_PATH
Simply
$:.unshift File.dirname(__FILE__)
November 2011
2 posts
1 tag
How to completely reset a remote repository
Delete the .git directory locally
Recreate the git repostory
git init
touch .gitignore
git add .gitignore
git commit -m 'Initial commit'
Push to remote server, overwriting
git remote add origin <url>
git push --force origin master
1 tag
How to create a new empty branch
Create a new empty branch named “your-new-branch”, clean up, add .gitignore and commit.
git symbolic-ref HEAD refs/heads/your-new-branch
rm .git/index
git clean -fdx
touch .gitignore
git add .gitignore
git commit -m 'Initial commit'
September 2011
1 post
1 tag
How to install rmagick gem on Ubuntu 10.04? →
Why can’t I remember this?
$ sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev
$ gem install rmagick
August 2011
1 post
1 tag
How to merge branch back into trunk
$ cd /path/to/trunk
$ svn merge --reintegrate http://example.com/path/to/branch
June 2011
1 post
2 tags
How to install Firefox 4 on Kubuntu 10.10
I’m a Kubuntu 10.10 user who want to use Firefox 4. Here’s what I did
Add the Firefox Stable PPA to the system source
sudo add-apt-repository ppa:mozillateam/firefox-stable
sudo apt-get install firefox
Remove the Ubuntu modification add-on
sudo apt-get purge ubufox xul-ext-ubufox
Remove the old Firefox 3.6 language pack
sudo rm -rf...
May 2011
1 post
2 tags
When you use after_sign_in_path_for, make sure your root controller is publicly accessible.
April 2011
1 post
2 tags
My Ruby on Rails on Windows setup
I am not a Windows fanboy but sometime I have to use it. Here is my current
Ruby on Rails environment setup on Windows 7.
Since I dealing with console (Command Prompt) a lot, so before I setup Ruby and Rails,
I install these 2 nifty tools first.
Console
Console is a Windows console window enhancement. Console features include:
multiple tabs, text editor-like text selection, different...
December 2010
1 post
Link dump for November 2010
A bit late though..here we go.
being agile: Creating and publishing your first ruby gem
Don’t Know Metaprogramming In Ruby?
jQuery 1.4.3 Offline Learning Kit - jQuery 1.4.3 Offline Learning Kit
Securing your SSH Server | Rackspace Cloud Computing & Hosting
Focus: My new book on simplicity in the age of distractions | zen habits
8 Ways to Speed Up the Performance of CakePHP Apps |...
November 2010
4 posts
1 tag
How to undo a push?
I wan to undo my last commit and push in branch master
$ git reset --hard HEAD^
HEAD is now at 539b80a CommitMessageGoesHere
$ git push -f origin 539b80a:master
Simple web application admin template →
Link dump for October 2010
Your Pages Will Load Faster with Rails! | Engine Yard Ruby on Rails Blog
How to hire a programmer when you’re not a programmer - (37signals)
How To Score Your Rails App’s Complexity Before Refactoring
You’re Cuking It Wrong – Elabs
Yet another Rails security checklist
:focus
Inline Code Finder - Robert’s talk
The First Step of Refactoring a Rails Application
...
3 tags
Deploying WordPress with Capistrano using wp-cap
Here is the steps:
Clone wp-cap to a directory, e.g. my-wordpress git clone git://github.com/adamhunter/wp-cap.git my-wordpress
Copy your WordPress files to my-wordpress/public so you will have
my-wordpress/
├── config
└── public
├── wp-admin
├── wp-content
└── wp-includes
You want to point your WordPress domain to my-wordpress/public
Move...
October 2010
4 posts
1 tag
How to undo a commit and redo? →
Here is how
git commit ...
$ git reset --soft HEAD^
$ edit
$ git commit -a -c ORIG_HEAD
1 tag
Why aren't you using git-flow? →
Git extensions to provide high-level repository operations for Vincent Driessen’s branching model.
Link dump for September 2010
Creating a Rails 3 application | a step-by-step screencast
11 Undiscovered Website Ideas to Steal and Make You Rich
google-sitemap_gen | Download google-sitemap_gen software for free at SourceForge.net
Behat - BDD in PHP - Behavior driven development for PHP
How to Code up a Web Design from PSD to HTML
Think Vitamin » 5 Advanced Photoshop Techniques for Web Designers
Think...
1 tag
Sanitize to the rescue! →
Most of the applications we create these days usually have an admin interface where an user with necessary privileges is able to manage the application content, respecting some business rules. Thus it is required that part of this content is easily manageable, which means the user needs to be able to add some formatting to the content. For us, it usually means that the user has to input HTML tags....
September 2010
15 posts
2 tags
Rails + SQL Server 2000 on Windows XP
Obviously they are not a perfect match, but somehow I need to get this done.
I did this on Windows XP with SQL Server 2000 (PE) Service Pack 4.
Install Ruby 1.9.2-p0
Install DevKit
Install rails gem install --version 2.3.9 rails
Install ruby-odbc gem install ruby-odbc --platform=ruby
Install activerecord-sqlserver-adapter gem install --version 2.3.10 activerecord-sqlserver-adapter
Create an...
1 tag
Dave Newman: Leaving .net →
We are, as software developers, in various states of alone-ness. A company I worked at once had been operating for years under the assumption that it was OK for software to take months to integrate and deploy; they had never heard of continuous integration. They thought it was normal to rewrite…
1 tag
Measuring complexity of Ruby 1.9 code with... →
metric_abc is a tool that can help you find bad code in your Ruby 1.9 projects. It is much simplier cousin of Flog, but does the job in absence of Flog in Ruby 1.9 world.
1 tag
Ruby-based regular expression editor →
Rubular is a Ruby-based regular expression editor. It’s a handy way to test regular expressions as you write them.
1 tag
Code Readability: Quick, Millions or Billions? →
Ruby allows underscores to be inserted into numbers between any two digits. The underscores are purely cosmetic and do not affect the value of the number. This feature allows a developer to use underscores as an accountant might use commas.
3193490646 # standard representation of a number in ruby
3_193_490_646 # same value, much more readable
One less excuse for order of magnitude...
1 tag
1 tag
Understanding and Applying Polymorphism in PHP →
In object oriented programming, polymorphism is a powerful and fundamental tool. It can be used to create a more organic flow in your application. This tutorial will describe the general concept of polymorphism, and how it can easily be deployed in PHP.
1 tag
Live your life in such a way that when your feet hit the floor in the morning,...
1 tag
Git: How to checkout a tracked remote branch
git checkout --track -b <local branch> <remote>/<tracked branch>
1 tag
How to disable CakePHP to update the 'modified'...
Set modified to false in your data array
$data['Item']['id'] = 2;
$data['Item']['name'] = "Foo";
$data['Item']['modified'] = false;
$this->Item->save($data);
1 tag
When running a single test unit
always include the test directory
ruby -Itest test/unit/category_test.rb
1 tag
How to list all users in my Linux system
perhaps someone knew a better way than this, for now just simply type cat /etc/passwd
1 tag
How to clear bash history →
1 tag
How to change default shell in Ubuntu →
1 tag
How to activate font anti-aliasing on NetBeans
Add -J-Dswing.aatext=true to netbeans_default_options
to your /usr/local/netbeans-6.8/etc/netbeans.conf file