http://www.impressivewebs.com/inline-block/
http://robertnyman.com/2010/02/24/css-display-inline-block-why-it-rocks-and-why-it-sucks/
http://www.quirksmode.org/css/display.html
http://www.w3schools.com/cssref/pr_class_display.asp
Thursday, December 8, 2011
Tuesday, September 20, 2011
How To boot into text mode in linux fedora
Power on computer when bios info shows up on the screen press F2 or F3, the GRUB boot screen appears.
Select the Fedora that you want to boot into, Press the a key boot kernel argument will show up. in the end of the argument string add '3'
Original argument
after modified in the end of arguments add a 3
the number 3 will cause fedora boot into text mode.
Select the Fedora that you want to boot into, Press the a key boot kernel argument will show up. in the end of the argument string add '3'
Original argument
kernel /vmlinuz-2.6.40.4-5.fc15.x86_64 root=LABEL=/ acpi=on rhgb quiet
after modified in the end of arguments add a 3
kernel /vmlinuz-2.6.40.4-5.fc15.x86_64 root=LABEL=/ acpi=on rhgb quiet 3
and press enter to be continuethe number 3 will cause fedora boot into text mode.
Monday, September 19, 2011
Transaction Log issue for SQL Server
-- View Transaction log
DBCC Log(myDbName)
-- Change Recovery model to simple
ALTER DATABASE myDbName SET RECOVERY SIMPLE
-- enable auto shrink option
ALTER DATABASE myDbName SET AUTO_SHRINK ON
-- Shrink DB Log file
DBCC SHRINKFILE(myDbName_log, TRUNCATEONLY)
SELECT * FROM sys.database_files
DBCC Log(myDbName)
If the recovery model is set to SIMPLE the log data will be cleared automatically.
-- How to Change Recovery Model to simple
use myDbName-- Change Recovery model to simple
ALTER DATABASE myDbName SET RECOVERY SIMPLE
-- enable auto shrink option
ALTER DATABASE myDbName SET AUTO_SHRINK ON
-- Shrink DB Log file
DBCC SHRINKFILE(myDbName_log, TRUNCATEONLY)
-- This command help you to find out what is database log file name
USE myDbNameSELECT * FROM sys.database_files
Thursday, September 15, 2011
the Linux rights of files and directory
1. the "file1" can be a file or directory
|---- owner
||----- group
|||------- other users
chmod 467 file1
1 = Execute
2 = Write
4 = Read
3 = 2+1 can Write, Execute
5 = 4+1 can Read, Execute
6 = 4+2 can Read, Write
7 = 4+2+1 can Read, Write, Execute
6 = 4+2 can Read, Write
7 = 4+2+1 can Read, Write, Execute
Basic vi Commands
Copy line yy
Copy next n line Nyy (N is number of lines to be copy)
Past line p
Insert before cursor i
Insert current line I
Replace R
Delete [Delete]
Delete Line dd
Undo u
Page Up [Ctrl] + b
Page Down [Ctrl] + f
To Begin of file :0 or 1G
To End of file :$ or G
Move To n line :nG (n is number of line)
Move beginning of line 0
Move end of line $
Search forward string /string
Search backward string ?string
to next match string n
to prev match string N
Save :w
Save and Exit :x or :wq
Exit :q
Exit without save :q!
Copy next n line Nyy (N is number of lines to be copy)
Past line p
Insert before cursor i
Insert current line I
Replace R
Delete [Delete]
Delete Line dd
Undo u
Page Up [Ctrl] + b
Page Down [Ctrl] + f
To Begin of file :0 or 1G
To End of file :$ or G
Move To n line :nG (n is number of line)
Move beginning of line 0
Move end of line $
Search forward string /string
Search backward string ?string
to next match string n
to prev match string N
Save :w
Save and Exit :x or :wq
Exit :q
Exit without save :q!
How to install Samba CentOS
Install samba
# yum install samba
Configure samba
# vi /etc/samba/smb.conf
[global]
workgroup = Linux
netbios name = CentOS_Srv
;name resolve order = bcast host lmhosts wins
server string = CentOS Samba v.%v
security = user
passdb backend = tdbsam
[www]
comment = Public WWW
path = /var/www
create mask = 0660
directory mask = 0771
writable = yes
valid users = user1 user2
Add User for samba
# useradd user1 -d /mnt/data/home/user1
# chown user1:user1 /mnt/data/home/user1
# passwd user1
# Enter your password
# smbpasswd -a user1
# /etc/init.d/smb restart
Configure Firewall for samba
Change IPTables
# vi /etc/sysconfig/iptables
#Includes the following before the REJECT line:
-A INPUT -p udp -m udp --dport 137 -j ACCEPT
-A INPUT -p udp -m udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
# service iptables restart
Run samba when OS starting
# chkconfig --levels 235 smb on
Client test
net use Z: \\192.168.6.2\www /user:user1
http://wiki.centos.org/HowTos/SetUpSamba
# yum install samba
Configure samba
# vi /etc/samba/smb.conf
[global]
workgroup = Linux
netbios name = CentOS_Srv
;name resolve order = bcast host lmhosts wins
server string = CentOS Samba v.%v
security = user
passdb backend = tdbsam
[www]
comment = Public WWW
path = /var/www
create mask = 0660
directory mask = 0771
writable = yes
valid users = user1 user2
Add User for samba
# useradd user1 -d /mnt/data/home/user1
# chown user1:user1 /mnt/data/home/user1
# passwd user1
# Enter your password
# smbpasswd -a user1
# /etc/init.d/smb restart
Configure Firewall for samba
Change IPTables
# vi /etc/sysconfig/iptables
#Includes the following before the REJECT line:
-A INPUT -p udp -m udp --dport 137 -j ACCEPT
-A INPUT -p udp -m udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
# service iptables restart
Run samba when OS starting
# chkconfig --levels 235 smb on
Client test
net use Z: \\192.168.6.2\www /user:user1
http://wiki.centos.org/HowTos/SetUpSamba
Wednesday, September 14, 2011
Config Network Adapter for CentOS Linux
vi /etc/sysconfig/network-scripts/ifcfg-eth0
#####################################
# for static ip
#DEVICE="eth0"
#BOOTPROTO="static"
#HWADDR="00:30:48:56:A6:2E"
#IPADDR="10.1.1.5"
#NETMASK="255.255.255.192"
#ONBOOT="yes"
#####################################
# for dhcp ip
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"
vi /etc/sysconfig/network
NETWORKING=yes
# for static ip
#HOSTNAME=host1.mysite.com
#GATEWAY=10.1.1.1
ifdown eth0
ifup eth0
or /etc/init.d/network restart
Subscribe to:
Posts (Atom)