(中文) 安装win7旗舰版系统后程序激活办法

2010-08-07, Nortan Posted in usefulness | 6 回复 | 查看全文>>

标签:

(中文) 免费并支持私有库的代码管理平台

2010-05-25, Nortan Posted in Programming, sharing, usefulness | 2 回复 | 查看全文>>

标签:

How to configure sudo in debian or ubuntu

2010-04-28, Nortan Posted in Configure | 4 回复 | 查看全文>>

Introduction
Sudo is a program designed to allow a sysadmin to give limited root privileges to users and log root activity. The basic philosophy is to give as few privileges as possible but still allow people to get their work done.

Debian’s sudo package has the password timeout set to 15 minutes. This means that when you first enter your password, as long as you don’t wait more than 15 minutes between sudo commands, you won’t have to enter it again. The password timeout can be immediately expired with sudo -k. 查看全文…

标签: , , ,

How to run a rake task from cron

2010-04-21, Nortan Posted in Programming, Ruby | 我来说两句 | 查看全文>>

Say you want to do run some stats on your Ruby on Rails application nightly. Create a rake task to do what you want then use cron to execute it.

1.Preflight information

First we need to create the RoR application.

rails cron
cd cron
script/generate model my_model
vi config/database.yml (set the database username/password, and databases created in your environment)

2. Creating the rake task(s)

2.1 Simple task

First lets see how to call any ruby code from rake. Rake code is placed in lib/tasks/FILENAME.rake. So lets create a lib/tasks/cron.rake and place this code in it: 查看全文…

标签: , ,

Config static ip in debian OS

2010-04-21, Nortan Posted in Configure | 9 回复 | 查看全文>>

Config static ip in debian,There are two files need to be modified,the one is “/etc/network/interfaces”,the other is “/etc/resolv.conf”./etc/network/interfaces used to config IP,netmask,gateway and so on,/etc/resolv.conf used to config DNS server address。
these are two examples: 查看全文…

标签: , ,