Tuesday, November 22, 2011

青椒炒鸡蛋

转贴: 青椒炒鸡蛋

作者:陆芳 时间:2011-7-5 14:27:33 

201107051049129471

  黄绿搭配,色彩美观,口味鲜香。

201107051106306996

  基本材料

  新鲜青椒150克,鸡蛋3个,豆油60克,精盐、香油、葱花各适量。

201107051107137868

  制作方法

  1.把青椒用清水洗净,去籽切成细丝。将鸡蛋打在碗里,加适量食盐,用筷子搅拌均匀。

  2.锅内放油(40克),烧热,将蛋汁倒入,炒好倒出,备用。

  3.往锅内倒入余油,烧热,放入葱花炝锅,稍微发黄即可,随后放入青椒丝,加精盐炒几下,见青椒丝翠绿色时,放入炒好的鸡蛋,翻炒均匀,用香油烹一下,即可出锅。

201107051108046058

  美味提示

  有些人喜欢放味精,其实在炒鸡蛋时最好不要放味精,这是最起码的常识。因为鸡蛋富含大量的谷氨酸和一 制作方法(11张)部分氯化钠,当鸡蛋被加热后,鸡蛋中的这两种物质会合成新的物质,这种物质化学名称叫谷氨酸钠,味精的主要成分就是这种物质,食物在加入这种物质后会有鲜味。但是,炒鸡蛋的时候如果放入味精这种物质,经过分解后的味精就会严重的破坏鸡蛋本身合成的自然鲜味。所以,建议各位家庭主妇在炒鸡蛋时切忌放入味精,这样才能保证鸡蛋的原汁原味。 

Thursday, July 14, 2011

Power supply discussion


In this first segment, I will be covering on power supplies and the quality of power supplies from different brands.
1) Why you should buy a quality power supply?
The reason is simple. Quality power supplies are not only able to deliver their rated power, but they also deliver it in a cleaner and more stable manner.
 This means that you will have to use less voltage to your CPU when overclocking, it also helps to prolong the life of your hardware when they are provided with clean, unfluctuating power.
Also, the power supply lasts longer.
2) What makes a good power supply?
There are many things a good power supply has.
Look for operational features like OCP (Overcurrent Protection), OVP/UVP (Overvoltage/Undervoltage protection), SCP (Short circuit Protection), PFC (Power factor correction) and such.
If you open up a quality power supply, chances are you'll find the following traits.
a) A fan with ball bearings from a reputable manufacturer. (AVC, Nidec, Sanyo, ADDA, Globe, Delta, etc.)
b) Quality Japanese capacitors that are rated at the higher maximum operating temperature of 105 degrees Celsius. (Nichihon, Nippon Chemicon, Hitachi, Rubycon)
c) Active PFC. This is evident when you see the absence of a voltage selector switch at the rear of the unit.
d) Sleeved cables. Now, it doesn't mean all PSU's with sleeved cables are good, but it usually means that they have at least added some quality to the cabling. Thick wires are also a good indicator.

Sunday, June 5, 2011

Buses up north

Courtesy of Epoch Travel

Monday, May 2, 2011

User management in Linux

User accounts in Linux works differently from the system in Windows.
ACLs are configured based on the system of UIDs. These are unique for each accounts. root account is UID 0 .UID 0-999 are typically reserved for system accounts.

Although there is only one UID 0 for administrator login, it is possible to “create” another administrator account by pointing said ID to UID 0. What we are doing is to create a replica of root ID.
useradd –o –u 0 userid
where –0 allow the creation of a user account with a duplicate (non-unique) UID ,    and –u link the ID to root UID.

Having another root level account on a system may not be desirable for user security governance and tracking. The use of sudo is recommended instead of having multiple administrator logins.

In Centos,
# visudo
Search for the commands section to grant the ID specific access rights. For example, to grant ID acme with root access with sudo, add a line underneath root.

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
acme    ALL=(ALL)       ALL

Set a password
# passwd user
Set  password expiry date
# chage -m 0 user  where -m is the minimum no of days

Saturday, April 30, 2011

Fixing Windows 7 boot problems

I was inspired to write this after spending an hour trying to get windows to boot. The problem started when i removed an IDE disk from the PC. Turns out that when i install windows on the PC with a pair of IDE and SATA disks, windows configured the IDE disk as the active partition even though i installed windows on the SATA disk. Now that the IDE disk is gone, there is no active partition. In this situation, the repair function windows boot CD will not work until an active partition is manually activated.

- Changing the active partition
Boot to repair mode on your windows CD. Under command prompt, run Diskpart
Look for the disk number with List disk
Select Disk x where x is the disk number from above
List Partition and look for the windows partition number
Select Partition x where x is the windows partition
With the active partition loaded correctly, the repair function now has the correction partition to work on.

- Restoring the boot sector on the active partition
The commandline way to rebuild the boot code.
Under Windows Vista and above, boot to repair mode on your windows CD
bootsect.exe /nt60 SYS /force where SYS refers to the system partition used to boot Windows. Replace SYS with ALL to update the boot code on all volumes that can be used as Windows boot volumes.

Sunday, April 24, 2011

Loading IPTables rules on reboot

IPTables rules are flushed after a reboot. I found out when i couldn't connect to a SOCKS5 proxy after the vps provider rebooted my node without notice. Poor system uptime seems to be a problem with some budget VPS. Here's how to make the rules stick after a reboot.

- On  Debian,
Save the rules to a file
#iptables-save > /etc/firewall.conf

Create a startup script so ifupdown loads these rules on boot:
vi /etc/network/if-up.d/iptables
#!/bin/sh
iptables-restore < /etc/firewall.conf

chmod +x /etc/network/if-up.d/iptables
Reboot, and check rules with iptables -L

- On  CentOS,

/sbin/service iptables save
This executes the iptables init script, which runs the /sbin/iptables-save program and writes the current iptables configuration to /etc/sysconfig/iptables. The existing /etc/sysconfig/iptables file is saved as /etc/sysconfig/iptables.save.

The next time the system boots, the iptables init script reapplies the rules saved in /etc/sysconfig/iptables by using the /sbin/iptables-restore command.


You can also save the iptables rules to a separate file for distribution, backup or other purposes. To save your iptables rules, type the following command as root:

[root@myserver ~]# iptables-save > <filename>
where <filename> is a user-defined name for your ruleset.

If distributing the /etc/sysconfig/iptables file to other machines, type /sbin/service iptables restart for the new rules to take effect.

Note the difference between the iptablescommand (/sbin/iptables), which is used to manipulate the tables and chains that constitute the iptables functionality, and the iptablesservice (/sbin/iptables service), which is used to enable and disable the iptables service itself.

To flush existing iptables rules

# vi stop.fw4

#!/bin/sh
echo "Stopping firewall and allowing everyone..."
# Delete and flush. Default table is "filter". Others like "nat" must be explici# tly stated.
iptables -F
iptables -X
iptables --delete-chain
iptables -t nat -F
iptables -t nat -X
# Delete all chains that are not in default filter and nat table
iptables --table nat --delete-chain
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
chmod +x stop.fw4
./stop.fw4