May 23, 2010
Now that you have the barebone Ubuntu server loaded on Linode, the next step is to set up a non-root user to manage it. Let's create a user called bruce:
Login into your box as root via the List console, then run this:
# adduser bruce --disabled-password
Add bruce to the sudo group:
# usermod -aG sudo bruce
Type visudo, and change this line
%sudo ALL=(ALL) ALL
to
%sudo ALL=NOPASSWD: ALL
so sudo won't ask us for password.
Next, we need to add our SSH public key to ~/.ssh/authorized_keys
We need to tell the sshd_config not to ask for password:
# vim /etc/ssh/sshd_config
Make sure you have this line:
PasswordAuthentication no
Finally, restart your sshd with this command: /etc/init.d/ssh restart
More resources:
Comment →
October 16, 2009
Firebug slows down Firefox significantly. It's most noticeable when opening Gmail.
To solve this, use Firefox profiles. You can run multiple instances of firefox with different profiles.
$ firefox -P coding --no-remote
That will start a new Firefox instance with "coding" profile. When plugins are installed, they are attached to a specific profile. To create/manage profiles, close Firefox and run:
$ firefox -ProfileManager
Don't you love Firefox?
Comment →
October 03, 2009
Should this model have a timestamp?
When in doubt, timestamp your models. When not in doubt, timestamp it anyway.
Because it's handy. While working on this site, someone accidentally generated duplicated games. I previously created those games two weeks earlier. I needed to removes games that were created within the last 24 hours. Timestamp to the rescue!
Game.delete_all([created_at > 1.day.ago])
Problem solved!
Comment →
© 2010 quiet Dynamite