1. Installl npp.5.0.beta.bin as usual
2. Download Japanese language pack.
Notepad++ 4.0.2 用日本語ロケール
http://homepage3.nifty.com/georgei/extension/notepadpp_jpl_v09.zip
3. Extract nativeLang.xml to npp.5.0.beta.bin\
4. Restart notepad++
5. From menu: Format -> UTF-8
Tuesday, 24 June 2008
Monday, 23 June 2008
ls awk to find filesizes
ls -lk | awk '{print $5;}'
[vuhung@aoclife src]$ ls -lk *c | head
-rw-r--r-- 1 vuhung vuhung 23 4月 5 07:45 cairo-analysis-surface.c
-rw-r--r-- 1 vuhung vuhung 9 4月 12 06:07 cairo-arc.c
-rw-r--r-- 1 vuhung vuhung 13 4月 8 07:30 cairo-array.c
-rw-r--r-- 1 vuhung vuhung 3 4月 4 01:25 cairo-atomic.c
-rw-r--r-- 1 vuhung vuhung 5 4月 5 07:45 cairo-base85-stream.c
-rw-r--r-- 1 vuhung vuhung 52 4月 5 07:45 cairo-bentley-ottmann.c
-rw-r--r-- 1 vuhung vuhung 11 4月 5 07:45 cairo-cache.c
-rw-r--r-- 1 vuhung vuhung 66 4月 8 07:30 cairo-cff-subset.c
-rw-r--r-- 1 vuhung vuhung 23 4月 5 07:45 cairo-clip.c
-rw-r--r-- 1 vuhung vuhung 5 1月 18 08:09 cairo-color.c
[vuhung@aoclife src]$ ls -lk *c | awk '{print $5;}' | head
23
9
13
3
5
52
11
66
23
5
Wednesday, 4 June 2008
Trojan.SpyBuddy
/home/vuhung/public_html/tmp/photography/software/PixelGenius_PhotoKit_v1.2.4_for_Photoshop.rar: Trojan.SpyBuddy FOUND
rm /home/vuhung/public_html/tmp/photography/software/PixelGenius_PhotoKit_v1.2.4_for_Photoshop.rar
rm /home/vuhung/public_html/tmp/photography/software/PixelGenius_PhotoKit_v1.2.4_for_Photoshop.rar
Thursday, 27 March 2008
Add GPS info to EXIF
Browser Google map and get
http://maps.google.com/?ie=UTF8&ll=35.675174,139.757635&spn=0.001181,0.002167&z=19
Pass the cordinators to exiftool:
C:\temp>exiftool -GPSLatitudeRef=N -GPSLongitudeRef=E -GPSAltitude=5 -GPSAltitudeRef="Above Sea Level" -overwrite_original -GPSLatitude=35.675174 -GPSLongitude=139.757635 -c "%.6f" "Yokoshima DSC_3562.jpg"
and we done.
batch process:
@echo off
echo adding gps ...
for %%nef in (dir /b *.NEF) DO exiftool -GPSLatitudeRef=N -GPSLongitudeRef=E -GPSAltitude=5 -GPSAltitudeRef="Above Sea Level" -overwrite_original -GPSLatitude=35.675174 -GPSLongitude=139.757635 -c "%.6f" %%nef
echo DONE
PAUSE
Or simply use this:
for %f in (*.JPG) DO exiftool -GPSLatitudeRef=N -GPSLongitudeRef=E -GPSAltitude=5 -GPSAltitudeRef="Above Sea Level" -overwrite_original -GPSLatitude=21.059562 -GPSLongitude=105.762752 -c "%.6f" %f
for %f in (*.NEF) DO exiftool -GPSLatitudeRef=N -GPSLongitudeRef=E -GPSAltitude=5 -GPSAltitudeRef="Above Sea Level" -overwrite_original -GPSLatitude=21.059562 -GPSLongitude=105.762752 -c "%.6f" %f
refs:
http://owl.phy.queensu.ca/~phil/exiftool/TagNames/GPS.html
http://www.carto.net/projects/photoTools/gpsPhoto/
http://hwat.sakura.ne.jp/hpod/200610/11-220000/
http://hwat.sakura.ne.jp/hpod/200609/28-200000/
http://en.wikipedia.org/wiki/Global_Positioning_System
Tuesday, 26 February 2008
squid configuration on Centos 5
1564,1565c1564,1565
< # /usr/lib/squid/ncsa_auth
< auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
---
> #
> # auth_param basic program /usr/libexec/ncsa_auth /usr/etc/passwd
1573c1573
< auth_param basic children 5
---
> # auth_param basic children 5
1586c1586
< auth_param basic realm Squid proxy-caching web server
---
> # auth_param basic realm Squid proxy-caching web server
1597c1597
< auth_param basic credentialsttl 2 hours
---
> # auth_param basic credentialsttl 2 hours
1769d1768
<
2412,2415d2410
< acl password proxy_auth REQUIRED
< http_access allow password
< http_access deny all
<
2461d2455
< follow_x_forwarded_for allow all
2528c2522
< acl our_networks src 192.168.11.0/24 192.168.1.0/24
---
> acl our_networks src 192.168.0.0/24 192.168.1.0/24
3214d3207
< cachemgr_passwd vuhung all
3444,3447d3436
< header_access X-Forwarded-For deny all
< header_access Via deny all
< header_access Cache-Control deny all
<
cd /etc/squid/
htpasswd -c -b passwd squid_name squid_password
/etc/init.d/squid start
diff squid.conf squid.conf.2008-02-26.orig > /home/vuhung/work/squid.conf.diff.`date -I`
< # /usr/lib/squid/ncsa_auth
< auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
---
> #
> # auth_param basic program /usr/libexec/ncsa_auth /usr/etc/passwd
1573c1573
< auth_param basic children 5
---
> # auth_param basic children 5
1586c1586
< auth_param basic realm Squid proxy-caching web server
---
> # auth_param basic realm Squid proxy-caching web server
1597c1597
< auth_param basic credentialsttl 2 hours
---
> # auth_param basic credentialsttl 2 hours
1769d1768
<
2412,2415d2410
< acl password proxy_auth REQUIRED
< http_access allow password
< http_access deny all
<
2461d2455
< follow_x_forwarded_for allow all
2528c2522
< acl our_networks src 192.168.11.0/24 192.168.1.0/24
---
> acl our_networks src 192.168.0.0/24 192.168.1.0/24
3214d3207
< cachemgr_passwd vuhung all
3444,3447d3436
< header_access X-Forwarded-For deny all
< header_access Via deny all
< header_access Cache-Control deny all
<
cd /etc/squid/
htpasswd -c -b passwd squid_name squid_password
/etc/init.d/squid start
diff squid.conf squid.conf.2008-02-26.orig > /home/vuhung/work/squid.conf.diff.`date -I`
squid configuration on Centos 5
cd /etc/squid/
htpasswd -c -b passwd squid_name squid_password
/etc/init.d/squid start
diff squid.conf squid.conf.2008-02-26.orig > /home/vuhung/work/squid.conf.diff.`date -I`
1564,1565c1564,1565
< # /usr/lib/squid/ncsa_auth < auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd --- > #
> # auth_param basic program /usr/libexec/ncsa_auth /usr/etc/passwd
1573c1573
< auth_param basic children 5 --- > # auth_param basic children 5
1586c1586
< auth_param basic realm Squid proxy-caching web server --- > # auth_param basic realm Squid proxy-caching web server
1597c1597
< auth_param basic credentialsttl 2 hours --- > # auth_param basic credentialsttl 2 hours
1769d1768
<> acl our_networks src 192.168.0.0/24 192.168.1.0/24
3214d3207
< cachemgr_passwd vuhung all
3444,3447d3436
< header_access X-Forwarded-For deny all
< header_access Via deny all
< header_access Cache-Control deny all
<
htpasswd -c -b passwd squid_name squid_password
/etc/init.d/squid start
diff squid.conf squid.conf.2008-02-26.orig > /home/vuhung/work/squid.conf.diff.`date -I`
1564,1565c1564,1565
< # /usr/lib/squid/ncsa_auth < auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd --- > #
> # auth_param basic program /usr/libexec/ncsa_auth /usr/etc/passwd
1573c1573
< auth_param basic children 5 --- > # auth_param basic children 5
1586c1586
< auth_param basic realm Squid proxy-caching web server --- > # auth_param basic realm Squid proxy-caching web server
1597c1597
< auth_param basic credentialsttl 2 hours --- > # auth_param basic credentialsttl 2 hours
1769d1768
<> acl our_networks src 192.168.0.0/24 192.168.1.0/24
3214d3207
< cachemgr_passwd vuhung all
3444,3447d3436
< header_access X-Forwarded-For deny all
< header_access Via deny all
< header_access Cache-Control deny all
<
Tuesday, 15 January 2008
Folding with vim, a cheat sheet
v|V, select zf or any other command ( fold in visual mode )
:20,101 fo[ld]: fold selected lines
zf/string: fold until the first match of "string" .
:mkview : save folds.
:loadview : load folds.
zf/string creates a fold from the cursor to string . Try within an "#ifdef" and "#endif".
zf#j creates a fold from the cursor down # lines.
zj moves the cursor to the next fold.
zk moves the cursor to the previous fold.
zo opens a fold at the cursor.
zO opens all folds at the cursor.
zm increases the foldlevel by one.
zM closes all open folds.
zr decreases the foldlevel by one.
zR decreases the foldlevel to zero -- all folds will be open.
zd deletes the fold at the cursor.
zE deletes all folds.
[z move to start of open fold.
]z move to end of open fold.
Subscribe to:
Posts (Atom)