Archive for the Category » зохион «

Thursday, March 26th, 2009 | Author:

Have you previously realised that www is redundant? If so, I’m preaching to the converted and you can run along back to whatever you were busy with. 😉 Otherwise, stand to attention, soldier!

begin rantish text:

When I’m browsing the web, I’d much less prefer to”. Reason being that if *every* site has to have w’s, what’s the point of the w’s? Not to mention that they’re a bitch to pronounce. There’s 9 syllables in there! You could almost halve that by sayingtriple-w”. I’ve heard people saydub dub dub”. Bleh. Even the World Wide Web Consortium prefers to call themselvesW3C”.

So what exactly is (was?) the point of the www? There might be more to it, however the gist of it appears to be that when Tim Berners-Lee first created the hypertext document retrieval system, he called itWorld Wide Web”. I believe that www became a standard not because it made sense or because it was a good idea, but because it was hyped far beyond the healthy respect it deserved.

Your web browser *knows* you’re dealing with web content solely by the fact that there’s an http:// in front of the url. Therefore I submit, the www is redundant.

Need more convincing?

Search engines see and as 2 separate web sites. Because both sites have identical content, search engines might lower your Search Rankings. Hell, you’d be competing against yourself for rankings. Silly example: instead of 3rd, you might be 5th болон 7th. For this reason, it is better to either force www or to force no www. I’m in favour of the latter.

If you browse to you will be redirected to Even if you go to the downloads directory of my main domain with a www, you’ll be redirected appropriately. Importantly, search engines will only find one copy of my web site, үгүй биш 2. And in the long run, I’ll be wearing out my w key a li’l less. 🙂

With the possible exception of a few quick deaths, no w’s were hurt during the production of this post.

эзлэх хувь
Wednesday, March 18th, 2009 | Author:

[edit] So much for that. It turns out that openssl is able to determine that the key and certificate are already in a single file. Therefore, no csplitting required (сайн, I hope somebody reading this at least learned about how nice csplit is). In fact, the whole script might as well be obsoleteblaargh. Well, at least it gives a nice warning about not giving a blank passphrase. 😀

Here’s the new version:

pem2pfxconverts a .pem-formatted file containing a private key and signed certificate into a Windows-compatible .pfx certificate file.

#Tricky -
# Converts a .pem certificate file to .pfx format
# $1 is the source file
set -e
бол [ $# = 1 ]; then
  outputfile=`echo $1 | sed 's/.pem$/.pfx/'`
  echo "Please specify a password below. Windows refuses to import a .pfx certificate with a blank password."
  openssl pkcs12 -export -out $outputfile -in $1
  echo "pem2pfx - converts a .pem formatted private-key and certificate file to an IIS-compatible .pfx file."
  echo "Usage: pem2pfx inputfile.pem"


эзлэх хувь
Saturday, February 21st, 2009 | Author:

The relatively new document types Office 2007 has given some web hosts problems when their clients want to offer documents for download. Most often, the documents are being offered by the web server as text/html which is then rendered as a ton of garbage on the web user’s screen.

The best way to resolve this is to add all the MIME types to the server’s main configuration. IIS7 for Windows already has these MIME types set up correctly by default. IIS6 and IIS5 require the MIME types to be added, as might Apache on older installations. For Apache, there is also a workaround for the individual domain owner to add the mime types via Apache’s .htaccess file.

IIS 6 MIME type addition (for the Server Administrator)

Before this can be done, ensure that your server is also set to allow direct metabase editing:

  1. Load IIS Manager: Start -> Run, “inetmgr” -> [OK]
  2. Right click theserverand clickProperties
  3. Within theInternet Information Servicestab (usually the only tab), ensure that theEnable Direct Metabase Editcheckbox is checked.
  4. Click [OK]

Be sure to back up IIS’s configuration (here for IIS5) beforehand. I won’t take any responsibility for an admin breaking his server. I have reason to believe this may also work on IIS5 however I have just as much reason to believe that it might just give lots of errors. If an IIS5 / Windows 2000 admin is willing to test this for me after backing up your configuration please let me know of the results.

Copy the following text into a file named msoff07-addmime.vbs and execute it once from the commandline by typing cscript msoff07-addmime.vbs and pressing Enter. If you run it more than once, the MIME types will be added each time and you will have multiple identical entries:

' This script adds the necessary Office 2007 MIME types to an IIS 6 Server.
' To use this script, just double-click or execute it from a command line.
' Running this script multiple times results in multiple entries in the
' IIS MimeMap so you should not run it more than once.
' Modified from
Dim MimeMapObj, MimeMapArray, MimeTypesToAddArray, WshShell, oExec
' Set the MIME types to be added
MimeTypesToAddArray = Array(".docm", "application/", _
".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", _
".dotm", "application/", _
".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", _
".potm", "application/", _
".potx", "application/vnd.openxmlformats-officedocument.presentationml.template", _
".ppam", "application/", _
".ppsm", "application/", _
".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", _
".pptm", "application/", _
".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation", _
".sldm", "application/", _
".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide", _
".xlam", "application/", _
".xlsb", "application/", _
".xlsm", "application/", _
".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", _
".xltm", "application/", _
".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template") 
' Get the mimemap object
Set MimeMapObj = GetObject("IIS://LocalHost/MimeMap")
' Call AddMimeType for every pair of extension/MIME type
For counter = 0 нь UBound(MimeTypesToAddArray) Step 2
    AddMimeType MimeTypesToAddArray(counter), MimeTypesToAddArray(counter+1)
' Create a Shell object
Set WshShell = CreateObject("WScript.Shell")
' Stop and Start the IIS Service
Set oExec = WshShell.Exec("net stop w3svc")
Do While oExec.Status = 0
    WScript.Sleep 100
Set oExec = WshShell.Exec("net start w3svc")
Do While oExec.Status = 0
    WScript.Sleep 100
Set oExec = Nothing
' Report status to user
WScript.Echo "Microsoft Office 2007 Document MIME types have been registered."
' AddMimeType Sub
Sub AddMimeType (Ext, MType)
    ' Get the mappings from the MimeMap property.
    MimeMapArray = MimeMapObj.GetEx("MimeMap") 
    ' Add a new mapping.
    i = UBound(MimeMapArray) + 1
    Redim Preserve MimeMapArray(i)
    Set MimeMapArray(i) = CreateObject("MimeMap")
    MimeMapArray(i).Extension = Ext
    MimeMapArray(i).MimeType = MType
    MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", MimeMapArray
End Sub

Apache MIME type addition (for the Server Administrator)

Apache stores its MIME types in a file normally located at $installpath/conf/mime.types. See the mod_mime documentation for more on how it works. Arch Linux installs its MIME types at /etc/httpd/conf/mime.types болон Parallels Plesk installs it in /usr/local/psa/admin/conf/mime.types. Your distribution might have it in another place, so find your mime.types file by running locate mime.types.

Add the following lines to your mime.types file:

application/                          docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document   docx
application/                          dotm
application/vnd.openxmlformats-officedocument.wordprocessingml.template   dotx
application/                    potm
application/vnd.openxmlformats-officedocument.presentationml.template     potx
application/                       ppam
application/                   ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow    ppsx
application/                pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/                       sldm
application/vnd.openxmlformats-officedocument.presentationml.slide        sldx
application/                            xlam
application/                     xlsb
application/                            xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet         xlsx
application/                         xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template      xltx

Apache MIME type addition (For the domain owner with at least FTP accessusing .htaccess file)

Add the following text to your domain’s .htaccess file, most commonly in an httpdocs/ directory

AddType application/ docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/ dotm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/ potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/ ppam
AddType application/ ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/ pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/ sldm
AddType application/vnd.openxmlformats-officedocument.presentationml.slide sldx
AddType application/ xlam
AddType application/ xlsb
AddType application/ xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/ xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
эзлэх хувь
Saturday, February 21st, 2009 | Author:

and my Personal Rating (PR) out of 10 😉

I use Firefox so most of these won’t apply to non-FF users. However, I’d be very very interested to hear what other addons my friends, subscribers, and random websurfers find interesting or useful to them. Have your say and let us know why you love the addons you love. 🙂

Personally, I prefer addons that aren’t intrusive. Ideally, an addon must have a minimal interface and give me a measurable benefit for me to keep it installed.

Cacheviewer – 7

This is a GUI front-end for the Cache Firefox keeps of the last few pages and media. Би Би магадгүй удалгүй түүнийг устгах гэж байна одоо ашигтай илүү сонирхолтой энэ addon олсон.

ColorfulTabs – 9

Би өнгө хайртай. талаар та хүрэх үед таб өнгө, бүлэглэл маш сайн ажиллахгүй бол 30 цонхнууд нь ч… :-/

Төлөв татаж авах – 10

Би цонхнууд нь нэг цонхонд Firefox-д бүгдийг нь байх илүүд үздэг. тусдаа цонхонд нь татаж авах хайрцгийг байх нь миний хувьд маш том ямар ч ямар ч юм. Энэ нь маш бага байдаг тул энэ нь бас дэлгэц үл хөдлөх хөрөнгийн авардаг. 🙂

Видео DownloadHelper – 10

Видео DownloadHelper хэвлэл мэдээллийн цацаж хайдаг – тусгайлан татаж байгаа ямар нэг том агуулга хайж. Хэрэв та дүрсэн дээр товшино уу үед, Энэ нь танд одоогоор-татаж урсгалыг харуулж, танд гэж дараалал сонголтыг өгдөг “хэвийн” татаж авах.

Та эрчим хүчний бууруулах гэж байна FF сүйрүүлэхийг гэж байгаа бол хэзээ ч мэдэхгүй учраас, эсвэл, Би ширээн Хуулбарыг нь аврахын тулд илүүд үздэг, би дараа нь дахин видеог татаж авах нь илүү зурвасын өргөнийг ашиглан ямар ч видеог үзэж болно байсан. Мөн, ажил, Хүмүүс намайг YouTube-ийн болон бусад хэвлэл мэдээллийн хэрэгслээр холбоосууд илгээх үед, Би ихэвчлэн дараа маш хүртэл харж санаа зовсны хэрэггүй – өөрийн чөлөөт үед эсвэл завсарлагааны үеэр.

Expiry Канарын – 9

Та одоогоор үзэж байгаа сайтын хувьд SSL гэрчилгээ хугацаа удахгүй дуусах гэж байгаа бол энэ нь цэвэр, хамгийн бага addon хэлж өгнө. Өөрийн сайт нь SSL гэрчилгээ байгаа бол, Би та улмаас мэдэгдэл, эсвэл miscommunication энгийн дутагдалтай минутанд таны сайтын SSL гэрчилгээ зайлсхийхийн тулд энэ addon ашиглахыг зөвлөж байна.

Fasterfox – 8

Fasterfox зарим сүлжээний optmisation тохируулгуудыг нэмдэг. зарим тохируулгууд таны корпорацийн сүлжээний ч тантай хамт бага зэрэг галзуу админ хийж болно. 😉

Firebug – 9

хуудасны вэб хөгжүүлэх бөгөөд туршилтад сайн. кодын бага бит турших, түүнчлэн хуудас дибаг хийх нь гайхалтай.

FoxClocks – 6

алджээ – Та бусад бүс дэх цаг хугацааны цаг хэлдэг. o.O нь богино хугацаанд ашигтай байсан – Одоо миний толгой оноос хойш илүү үүнийг хурдан Би илүү харах болно ажиллаж байна. RM -f

FoxyProxy – 9

тодорхой прокси сервер дамжуулан тодорхой хуудсыг үзэж байгаа нь гайхалтай. Энэ нь зарим нэг сайтууд хаагдсан эсвэл үед нь ашигтай байдаг SAIX Ил тод Proxy сервер зөв ажиллаж чадахгүй байна. 🙂

Би харин үндсэн чиглэлийн замаар явж чадахгүй байсан прокси сервер дээр зарим нэг урсгалыг чиглэлд энэ ашиглах. Түүний бас маш уян хатан. Та нэгээс илүү прокси сервер байгаа байх, та нар ихэвчлэн гэнэт ашиглах нэг ирмэхийн зуур дээр явдаг бол, зүгээр л дараагийн нэг уруу шилжихэд. 🙂

Greasemonkey – 10

Яг одоо, Би зөвхөн энэ ашиглах GooglemonkeyR скрипт. Энэ скрипт нь reformats Google-ийн'Таны үзүүлэлтэд ын хайлтын үр дүнг мөн хуудасны Google-ийн холбоосууд нь жижиг зургуудыг харуулах сонголт байна. Greasemonkey нь хийж болно маш их илүү хялбар скриптүүдийн олон байдаг боломжтой олон олон сайтуудад.

Live HTTP толгой – 8

Би IIS вэб сервер нь gzip шахалтыг асуудлыг оношлох энэ нь хэд хэдэн удаа ашиглаж байсан. Хэдийгээр хэлэх бас их биш: Энэ ажил.

амьд PageRank – 10 (Одоогоор – Зөвхөн үүнийг өчигдөр суулгасан)

Энэ addon хангалттай энгийн юм шиг. Энэ нь Google-аас PageRank авдаг, бохир үүнийг харуулж байна.

NoScript – 10

NoScript хаах рекламыг дээр Гайхалтай юм. Та дуртай бүхий л газруудыг цагаан жагсаалтад оруулж байна оноос хойш анх удаа өөрийн бага зэрэг цочроох – Харин урт хугацаанд энэ soooo энэ нь үнэ цэнэтэй юм. 🙂

хуудаснууд амилуулж – 10

Та сайтад хайж бол маш ач холбогдолтой бөгөөд энэ нь доош байх ёстой юу. сайт юм бол статик агуулга чиглэсэн байвал энэ нь түүний онлайн кэш хийгдсэн бол энэ нь маш хурдан агуулгыг олоход хялбар болгодог.

Tab Mix Plus – 8

Гайхалтай та илүү 7-эсвэл-болохоор цонхоо байгаа бол.

ShowIP (ажил зорилгоор өөрчилсөн хувилбарыг ашиглаж – үзэж байгаа үед компани нь серверийн Дүрмийн дагуу ийм нэрийг харуулна) – 10

Би там нь энэ залгаасыг идэвхжүүлэхийн ямар нэг серверийг тодорхойлох замаар явах нь надад байсан төсөөлж чадахгүй. За, би чадна. энэ бүх цаг хугацаа хийх хэрэгтэй Ашиглагдсан. Би эцэст нь үүнийг бичигдсэн боловч би эх бичиг олж чадахгүй. Энд тэр скриптийг байсан ямар үүсгэх нь миний 60 дахь оролдлого юм:

$ муур / гэх мэт / хостууд | grep `A $ хостын нэр @mycachingnameserver ухах | grep . | grep -v "^;"`
$ ухаж -x `A $ хостын нэр @mycachingnameserver ухах | grep ^ $ хостын нэр | grep нь | \
  awk '/[.]/{хэвлэх $5}' `@mycachingnameserver | grep . | grep -v "^;"

Вэб хөгжүүлэгч – 9

Би хуудасны зарим асуудлыг оношлох энэ удаа хэрэглэдэг. Тиймээс би энэ хүнийг устгах гэж байна би их вэб хөгжлийг хийж чадахгүй байна. Түүний би үүнд итгэж оноос хойш чанаруудын тухай ямар ч сэтгэгдэл дээд ховилын нэмж дээр нь байгаа бол Хэрэв та вэб хөгжүүлэлтийн ажил нь маш их хийж байна.

эзлэх хувь
Tuesday, February 17th, 2009 | Author:

Some of you may already know that I built a home server not too long ago. I documented some of the very important parts of how it was built though I was planning on releasing all the documentation all at once. I was using Arch Linux and I hadn’t nearly finished everything, especially the documentation. Жишээ нь:, it was supposed to be a media server. After some disk shuffling, it was supposed to end up having a RAID1 for the boot and RAID 10 for the rest (the media part).

This didn’t work out at all.

I got as far as having an efficient (болон сайнfirewalled) routing gateway server. I was finally satisfied that the customised local routing* was working correctly and I was confident that my tests with DHCP meant I could disable the DHCP service on the flimsy ADSL router and have all my flatmates start using the server as the Internet гарц. Instead: I was logged in to the server from the office, I’d just installed Apache2**, and I was about to consult with a colleague regarding getting nice graphs put together so the flatmates could all see who was using up the bandwidth***when I noticed a little message indicating that the root filesystem had been remounted read-only due to some or other disk failure.

And then I lost my connection to the server.

And then I gained a foul mood.


When I arrived home, I found that, as I had guessed from the descriptive message given at the office, the (very) old 80GB IDE disk that I was using for the root filesystem had failed. Unfortunately, the server would never boot again and there was little chance of prying everything off onto another disk to continue where I’d left off.

I’m buying a replacement (SATA) HDD this next weekend just after pay dayand I’ve changed my mind about documenting my progressand backing up my configurations:

Release Early. Release Often.

* ISPs in South Africa charge less (easy price comparison) forlocal-only” (within South Africa) traffic on ADSL but only if you use an ADSL account that CANNOT access web services outside of South Africa. This means that if you want to take advantage of the reduced costs but still be able to access the Internet at large, you need to set up some sneaky routing.

** one-command-install: ~$ yaourt -S apache

*** Internet Access in SA is expensiveyou get charged about R70 ($7 / £4.9 / €5.46) per GB when using ADSL, or about R2 per MB if using GPRS / 3G.

эзлэх хувь