Colouring MOTD
Terminal should be ANSI compliant and support colour escape sequences. Modern terminal should do the job.
The following is a list of escape sequences
The ^[ is produced by pressing Ctrl-V then ESC
I’m using vi as text editor and there’s no problem with ctrl-V ESC, i’m not test it on other text editor.
^[[0m - Reset the terminal characteristics ^[[1m - emphasis (bold) ^[[30m - Foreground black ^[[31m - Foreground red ^[[32m - Foreground green ^[[33m - Foreground yellow ^[[34m - Foreground blue ^[[35m - Foreground magenta ^[[36m - Foreground cyan ^[[37m - Foreground white
Speeding up your website using eaccelerator and memcache/memcached
Php default behaviour is always re-compile our script everytime accessed by users/browsers. eaccelerator can increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.
memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
Here’s how to install eaccelerator extension
$ wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6-rc1.tar.bz2 $ tar xjf eaccelerator-0.9.6-rc1.tar.bz2 $ cd eaccelerator-0.9.6-rc1 $ phpize $ ./configure $ make $ sudo make install $ cd /var/cache $ sudo mkdir eaccelerator $ sudo chown -R apache:apache eaccelerator
Most Commonly Used ipv6 Command In My Windows XP Workstation
ipv6 if
This command displays interface information.
D:\Documents and Settings\harry>ipv6 if 7 Interface 7: Ethernet: Local Area Connection Guid {3FCF938D-344F-4515-8CA2-3FA8801C15C3} zones: link 7 site 2 uses Neighbor Discovery uses Router Discovery link-layer address: 00-19-d1-ea-ee-16 preferred global 2001:470:19:13c:219:d1ff:feea:ee16, life 29d23h59m59s/6d23h59m59s (public) preferred link-local fe80::219:d1ff:feea:ee16, life infinite multicast interface-local ff01::1, 1 refs, not reportable multicast link-local ff02::1, 1 refs, not reportable multicast link-local ff02::1:ffea:ee16, 2 refs, last reporter link MTU 1500 (true link MTU 1500) current hop limit 64 reachable time 19000ms (base 30000ms) retransmission interval 1000ms DAD transmits 1 default site prefix length 48
ipv6 rt
This command displays the current contents of the routing table.
D:\Documents and Settings\harry>ipv6 rt ::/0 -> 7/fe80::20c:29ff:fe1e:b535 pref 256 life 26s (autoconf) 2001:470:19:13c::/64 -> 7 pref 8 life 29d23h59m56s (autoconf)
Toggle IP From Static to DHCP to Static Tool
I’ve created small tool(for windows XP/Vista), writen in visual basic 6.this tool was created for switching between static LAN ip to DHCP and back to original static IP (original IP saved in temporary variable) without opening network configuration, And without typing anything, just few mouse click is what we need. This tool using Windows Management Instrumentation for enumerating all network interface, get parameters, and set parameters.
Set objwmiservice = GetObject("winmgmts:\\.\root\cimv2") Set colNIC_Config = objwmiservice.ExecQuery("Select * from Win32_NetworkAdapterConfiguration WHERE Index='" && _ Netconf.strIFIndex(CboIF.ListIndex) && "' AND IPEnabled=TRUE")
Naked Woman On IPv6
I found interesting stuff today. While i was submiting daily tests for hurricane electric.certification, i got this whois result:
[Querying whois.ripe.net]
[whois.ripe.net]
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf
% Note: This output has been filtered.
% To receive output for a database update, use the "-B" flag.
% Information related to '2001:820::/32'
inet6num: 2001:820::/32
netname: NO-WEBONLINE-20020712
descr: WebOnline A/S
country: NO
org: ORG-WAon1-RIPE
admin-c: JH914-RIPE
tech-c: WO1095-RIPE
mnt-by: RIPE-NCC-HM-MNT
mnt-lower: WEBONLINE
mnt-routes: WEBONLINE
status: ALLOCATED-BY-RIR
source: RIPE # FilteredHow to calculate linux user umask
WordPress HE IPv4 Exhaustion Counter Plugin
Hello World
A “hello world” program has become the traditional first program that many people learn. Here’s i’ll show you how to print “Hello World” in A web page.
Using HTML
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML> <HEAD> <TITLE> Hello World </TITLE> </HEAD> <BODY> <P>hello world</P> </BODY> </HTML>
Postfix smtp outgoing load balancing
I got good workaround for balancing smtp outgoing from postfix mailing list archives(not using expensive real load balancer). suppose we have 4 smtp servers for outgoing email, and we need to configure/load balance like this:
+------------+
| |
+----------> smtp backend a -------->| |
| | |
clients --------> smtp lb -----> smtp backend b -------->| Intenet |
| | |
+----------> smtp backend c -------->| |
| |
+------------+
Here’s the configuration :