lunedì 22 settembre 2014

Recurring locale problem in Ubuntu

A fix for Perl warnings, command-not-found crashes, etc:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales

I don't think this is the real solution, there may be something on the client side (iTerm2) to figure out as well.

UPDATE:

Adding the following to .bashrc seems to solve the problem:

export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

martedì 2 aprile 2013

Here's a nice collection of Ruby one-liners. Having a few of these formulas at hand, may save you lots of work...

mercoledì 27 marzo 2013

Creating a remote git repo

Assuming you have a project in your local machine and console access to a remote server (and git installed on both), these instructions will accomplish the following:

  1. turn your local copy into a git repository
  2. push it to the remote server

venerdì 25 maggio 2012

Finding out where a ruby method is defined

To find out the source file/line of a ruby method definition, do something like the following:

Post.all.method(:all).source_location
Post.first.method(:save).source_location

Here's the source of this tip.

lunedì 18 luglio 2011

Unencrypting home directory in Ubuntu

In an Ubuntu install, I once requested home folder encryption. Bad idea.

To revert to regular file management I followed these instructions, which involved commenting out a line in each of the /etc/pam.d/common* files.

During a subsequent aptitude safe-upgrade, those lines were restored, not sure why.

I have again commented them out.