Tagged with "cheatsheet" http://www.addedbytes.com/feeds/tag-feed/ en Web Development in Brighton - Added Bytes 2006 120 Internet Country Codes http://www.addedbytes.com/blog/code/internet-country-codes/ I recently had need to create a list of the ccTLDs, to allow someone to find out what a country's ccTLD was. Maybe it'll be useful to someone else as well!

Afghanistan.af
Albania.al
Algeria.dz
American Samoa.as
Andorra.ad
Angola.ao
Anguilla.ai
Antarctica.aq
Antigua and Barbuda.ag
Argentina.ar
Armenia.am
Aruba.aw
Australia.au
Austria.at
Azerbaijan.az
Bahamas, The.bs
Bahrain.bh
Bangladesh.bd
Barbados.bb
Belarus.by
Belgium.be
Belize.bz
Benin.bj
Bermuda.bm
Bhutan.bt
Bolivia.bo
Bosnia and Herzegovina.ba
Botswana.bw
Bouvet Island.bv
Brazil.br
British Indian Ocean Territory.io
British Virgin Islands.vg
Brunei.bn
Bulgaria.bg
Burkina Faso.bf
Burma.mm
Burundi.bi
Cambodia.kh
Cameroon.cm
Canada.ca
Cape Verde.cv
Cayman Islands.ky
Central African Republic.cf
Chad.td
Chile.cl
China.cn
Christmas Island.cx
Cocos (Keeling) Islands.cc
Colombia.co
Comoros.km
Congo, Democratic Republic of the.cd
Congo, Republic of the.cg
Cook Islands.ck
Costa Rica.cr
Cote d'Ivoire.ci
Croatia.hr
Cuba.cu
Cyprus.cy
Czech Republic.cz
Denmark.dk
Djibouti.dj
Dominica.dm
Dominican Republic.do
East Timor.tl
Ecuador.ec
Egypt.eg
El Salvador.sv
Equatorial Guinea.gq
Eritrea.er
Estonia.ee
Ethiopia.et
Falkland Islands (Islas Malvinas).fk
Faroe Islands.fo
Fiji.fj
Finland.fi
France.fr
France, Metropolitan.fx
French Guiana.gf
French Polynesia.pf
French Southern and Antarctic Lands.tf
Gabon.ga
Gambia, The.gm
Gaza Strip.ps
Georgia.ge
Germany.de
Ghana.gh
Gibraltar.gi
Greece.gr
Greenland.gl
Grenada.gd
Guadeloupe.gp
Guam.gu
Guatemala.gt
Guernsey.gg
Guinea.gn
Guinea-Bissau.gw
Guyana.gy
Haiti.ht
Heard Island and McDonald Islands.hm
Holy See.va
Honduras.hn
Hong Kong.hk
Hungary.hu
Iceland.is
India.in
Indonesia.id
Iran.ir
Iraq.iq
Ireland.ie
Israel.il
Italy.it
Jamaica.jm
Japan.jp
Jersey.je
Jordan.jo
Kazakhstan.kz
Kenya.ke
Kiribati.ki
Korea, North.kp
Korea, South.kr
Kuwait.kw
Kyrgyzstan.kg
Laos.la
Latvia.lv
Lebanon.lb
Lesotho.ls
Liberia.lr
Libya.ly
Liechtenstein.li
Lithuania.lt
Luxembourg.lu
Macau.mo
Macedonia.mk
Madagascar.mg
Malawi.mw
Malaysia.my
Maldives.mv
Mali.ml
Malta.mt
Man, Isle of.im
Marshall Islands.mh
Martinique.mq
Mauritania.mr
Mauritius.mu
Mayotte.yt
Mexico.mx
Micronesia, Federated States of.fm
Moldova.md
Monaco.mc
Mongolia.mn
Montserrat.ms
Morocco.ma
Mozambique.mz
Namibia.na
Nauru.nr
Nepal.np
Netherlands.nl
Netherlands Antilles.an
New Caledonia.nc
New Zealand.nz
Nicaragua.ni
Niger.ne
Nigeria.ng
Niue.nu
Norfolk Island.nf
Northern Mariana Islands.mp
Norway.no
Oman.om
Pakistan.pk
Palau.pw
Panama.pa
Papua New Guinea.pg
Paraguay.py
Peru.pe
Philippines.ph
Pitcairn Islands.pn
Poland.pl
Portugal.pt
Puerto Rico.pr
Qatar.qa
Reunion.re
Romania.ro
Russia.ru
Rwanda.rw
Saint Helena.sh
Saint Kitts and Nevis.kn
Saint Lucia.lc
Saint Pierre and Miquelon.pm
Saint Vincent and the Grenadines.vc
Samoa.ws
San Marino.sm
Sao Tome and Principe.st
Saudi Arabia.sa
Senegal.sn
Serbia and Montenegro.cs
Seychelles.sc
Sierra Leone.sl
Singapore.sg
Slovakia.sk
Slovenia.si
Solomon Islands.sb
Somalia.so
South Africa.za
South Georgia and the Islands.gs
Soviet Union.su
Spain.es
Sri Lanka.lk
Sudan.sd
Suriname.sr
Svalbard.sj
Swaziland.sz
Sweden.se
Switzerland.ch
Syria.sy
Taiwan.tw
Tajikistan.tj
Tanzania.tz
Thailand.th
Togo.tg
Tokelau.tk
Tonga.to
Trinidad and Tobago.tt
Tunisia.tn
Turkey.tr
Turkmenistan.tm
Turks and Caicos Islands.tc
Tuvalu.tv
Uganda.ug
Ukraine.ua
United Arab Emirates.ae
United Kingdom.uk
United States.us
United States Minor Outlying Islands.um
Uruguay.uy
Uzbekistan.uz
Vanuatu.vu
Venezuela.ve
Vietnam.vn
Virgin Islands.vi
Virgin Islands (UK).vg
Virgin Islands (US).vi
Wallis and Futuna.wf
West Bank.ps
Western Sahara.eh
Western Samoa.ws
Zambia.zm
Zimbabwe.zw

Reverse Lookup

This list is ordered by the domain names, rather than countries, to allow you to find out which country a domain name represents.

Andorra.ad
United Arab Emirates.ae
Afghanistan.af
Antigua and Barbuda.ag
Anguilla.ai
Albania.al
Armenia.am
Netherlands Antilles.an
Angola.ao
Antarctica.aq
Argentina.ar
American Samoa.as
Austria.at
Australia.au
Aruba.aw
Azerbaijan.az
Bosnia and Herzegovina.ba
Barbados.bb
Bangladesh.bd
Belgium.be
Burkina Faso.bf
Bulgaria.bg
Bahrain.bh
Burundi.bi
Benin.bj
Bermuda.bm
Brunei.bn
Bolivia.bo
Brazil.br
Bahamas, The.bs
Bhutan.bt
Bouvet Island.bv
Botswana.bw
Belarus.by
Belize.bz
Canada.ca
Cocos (Keeling) Islands.cc
Congo, Democratic Republic of the.cd
Central African Republic.cf
Congo, Republic of the.cg
Switzerland.ch
Cote d'Ivoire.ci
Chile.cl
Cameroon.cm
China.cn
Colombia.co
Costa Rica.cr
Serbia and Montenegro.cs
Cuba.cu
Cape Verde.cv
Christmas Island.cx
Cyprus.cy
Czech Republic.cz
Germany.de
Djibouti.dj
Denmark.dk
Dominica.dm
Dominican Republic.do
Algeria.dz
Ecuador.ec
Estonia.ee
Egypt.eg
Western Sahara.eh
Eritrea.er
Spain.es
Ethiopia.et
Finland.fi
Fiji.fj
Falkland Islands (Islas Malvinas).fk
Micronesia, Federated States of.fm
Faroe Islands.fo
France.fr
France, Metropolitan.fx
Gabon.ga
Grenada.gd
Georgia.ge
French Guiana.gf
Guernsey.gg
Ghana.gh
Gibraltar.gi
Greenland.gl
Gambia, The.gm
Guinea.gn
Guadeloupe.gp
Equatorial Guinea.gq
Greece.gr
South Georgia and the Islands.gs
Guatemala.gt
Guam.gu
Guinea-Bissau.gw
Guyana.gy
Hong Kong.hk
Heard Island and McDonald Islands.hm
Honduras.hn
Croatia.hr
Haiti.ht
Hungary.hu
Indonesia.id
Ireland.ie
Israel.il
Man, Isle of.im
India.in
British Indian Ocean Territory.io
Iraq.iq
Iran.ir
Iceland.is
Italy.it
Jersey.je
Jamaica.jm
Jordan.jo
Japan.jp
Kenya.ke
Kyrgyzstan.kg
Cambodia.kh
Kiribati.ki
Comoros.km
Saint Kitts and Nevis.kn
Korea, North.kp
Korea, South.kr
Kuwait.kw
Cayman Islands.ky
Kazakhstan.kz
Laos.la
Lebanon.lb
Saint Lucia.lc
Liechtenstein.li
Sri Lanka.lk
Liberia.lr
Lesotho.ls
Lithuania.lt
Luxembourg.lu
Latvia.lv
Libya.ly
Morocco.ma
Monaco.mc
Moldova.md
Madagascar.mg
Marshall Islands.mh
Macedonia.mk
Mali.ml
Burma.mm
Mongolia.mn
Macau.mo
Northern Mariana Islands.mp
Martinique.mq
Mauritania.mr
Montserrat.ms
Malta.mt
Mauritius.mu
Maldives.mv
Malawi.mw
Mexico.mx
Malaysia.my
Mozambique.mz
Namibia.na
New Caledonia.nc
Niger.ne
Norfolk Island.nf
Nigeria.ng
Nicaragua.ni
Netherlands.nl
Norway.no
Nepal.np
Nauru.nr
Niue.nu
New Zealand.nz
Oman.om
Panama.pa
Peru.pe
French Polynesia.pf
Papua New Guinea.pg
Philippines.ph
Pakistan.pk
Poland.pl
Saint Pierre and Miquelon.pm
Pitcairn Islands.pn
Puerto Rico.pr
Gaza Strip.ps
West Bank.ps
Portugal.pt
Palau.pw
Paraguay.py
Qatar.qa
Reunion.re
Romania.ro
Russia.ru
Rwanda.rw
Saudi Arabia.sa
Solomon Islands.sb
Seychelles.sc
Sudan.sd
Sweden.se
Singapore.sg
Saint Helena.sh
Slovenia.si
Svalbard.sj
Slovakia.sk
Sierra Leone.sl
San Marino.sm
Senegal.sn
Somalia.so
Suriname.sr
Sao Tome and Principe.st
Soviet Union.su
El Salvador.sv
Syria.sy
Swaziland.sz
Turks and Caicos Islands.tc
Chad.td
French Southern and Antarctic Lands.tf
Togo.tg
Thailand.th
Tajikistan.tj
Tokelau.tk
East Timor.tl
Turkmenistan.tm
Tunisia.tn
Tonga.to
Turkey.tr
Trinidad and Tobago.tt
Tuvalu.tv
Taiwan.tw
Tanzania.tz
Ukraine.ua
Uganda.ug
United Kingdom.uk
United States Minor Outlying Islands.um
United States.us
Uruguay.uy
Uzbekistan.uz
Holy See.va
Saint Vincent and the Grenadines.vc
Venezuela.ve
British Virgin Islands.vg
Virgin Islands (UK).vg
Virgin Islands.vi
Virgin Islands (US).vi
Vietnam.vn
Vanuatu.vu
Wallis and Futuna.wf
Samoa.ws
Western Samoa.ws
Mayotte.yt
South Africa.za
Zambia.zm
Zimbabwe.zw


]]>
Fri, 07 Oct 2005 09:06:59 +0100 http://www.addedbytes.com/blog/code/internet-country-codes/ Dave Child ,,,,,,,,,,
View Page Structure http://www.addedbytes.com/blog/code/view-page-structure/ A couple of days ago, I was having a little CSS trouble. In the end, it turned out that I had set a property of an element "above" in the document tree, and the problematic element was inheriting that property.

It struck me that it would be easier to work through this kind of CSS problem with some kind of simple tool to show how a page was put together. If I could see all the tags on the page in a nested format, with parent and child relationships obvious, and without all the text getting in the way, my life would be easier.

So, I put together this tool. In simple terms, it will fetch a page from a web server and output the tags within the page in a nested list. The JavaScript side of it will also highlight children of an element when you hover over it.

Classes and ids attributes are highlighted, as are tag names. Class and ID names, though, must be enclosed in quotation marks to be highlighted. Text, closing tags and line breaks are not shown. Though I can understand some people may find it useful to see text, I found it made the tree too large to be usable.

I've used it a few times, and am quickly finding it saves quite a lot of time solving simple CSS problems or conflicts. Which is exactly what it was supposed to do. Enjoy!

Highlighting Issues

When writing the tool, I came across a fairly unusual problem. I wanted, when the mouse was over an element, to highlight its children. However, this cannot be done with CSS (at least, I couldn't think of a way to make it work).

The problem with the CSS was that whenever you hover over an element, you are also hovering over its parents. So they, and their children, are highlighted - meaning everything is highlighted. For this reason, the highlighting of elements uses JavaScript.

How to Use

The page structure tool is written to accept a URL either by GET or POST. You can therefore use it one of two ways.

First, you can use the tool by visiting the URL below, replacing "##url##" with the address of the page you want to view:

http://www.addedbytes.com/view_structure.php?url=##url##

Alternatively, you can use the following form to submit an address to the page:

Bookmarklet

To make life a little easier, I've coded a quick JavaScript bookmarklet for you to use, that, when activated, will automatically submit the URL of the page you are viewing to the tool. Simply copy or drag the link below to your links bar, your favourites folder or anywhere else you wish:

Notes

  • This tool works best with valid code, especially XHTML.
  • A certain amount of basic code improvement is done before processing (for example all empty tags are automatically closed).
  • Sites with non-empty tags that aren't closed properly may not show up correctly.
  • Sites with large amounts of nested code should still show up, but it may be difficult to view the output.

Example

If you want to see an example of the output of this tool, you can view the structure for AddedBytes.com.



]]>
Tue, 12 Oct 2004 16:24:00 +0100 http://www.addedbytes.com/blog/code/view-page-structure/ Dave Child ,,,,,,,,,,