This list served quite some people but someone else did a better job since.
Go to https://github.com/umpirsky/country-list for a list in your language and format.
I've also compiled a list of nationalities
This list served quite some people but someone else did a better job since.
Go to https://github.com/umpirsky/country-list for a list in your language and format.
I've also compiled a list of nationalities
var flattenObject = function(ob) { | |
var toReturn = {}; | |
for (var i in ob) { | |
if (!ob.hasOwnProperty(i)) continue; | |
if ((typeof ob[i]) == 'object') { | |
var flatObject = flattenObject(ob[i]); | |
for (var x in flatObject) { | |
if (!flatObject.hasOwnProperty(x)) continue; |
function uuid() { | |
var uuid = "", i, random; | |
for (i = 0; i < 32; i++) { | |
random = Math.random() * 16 | 0; | |
if (i == 8 || i == 12 || i == 16 || i == 20) { | |
uuid += "-" | |
} | |
uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16); | |
} |
module PaginationHelper | |
# The main pagination method, you should only need to call this | |
# Returns full HTML markup for pagination links | |
def pagination(page, pages, uri) | |
html, ul = [], [] | |
html << pagination_position(page, pages) | |
if pages > 1 | |
ul << pagination_previous_link(page, uri) | |
ul << pagination_page_links(page, pages, uri) |
#! /usr/bin/env python | |
############################################################################### | |
## | |
## Copyright 2012 Jeet Sukumaran. | |
## | |
## This program is free software; you can redistribute it and/or modify | |
## it under the terms of the GNU General Public License as published by | |
## the Free Software Foundation; either version 3 of the License, or | |
## (at your option) any later version. |
#!/usr/bin/python | |
"""Print a swatch using all 256 colors of 256-color-capable terminals.""" | |
__author__ = "Marius Gedminas <marius@gedmin.as>" | |
__url__ = "https://gist.github.com/mgedmin/2762225" | |
__version__ = '2.0' | |
def hrun(start, width, padding=0): |
Source: http://superuser.com/questions/360434/any-way-to-save-all-psd-layers-separately | |
Imagemagick will by default convert a psd to multiple images: | |
convert file.psd file.png | |
will result in file-0.png, file-1.png etc for each layer. If you wanted a single image, use the flatten switch: | |
convert file.psd -flatten file.png | |
Imagemagick is available on osx, windows and linux. And iOS somehow. |
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
# --no-check-cerftificate was necessary for me to have wget not puke about https | |
curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |
/*Transparent pattern placed over an image, like we see on the bootstrap homepage: http://twitter.github.com/bootstrap/index.html*/ | |
div { | |
width: 200px; | |
height: 200px; | |
display: block; | |
position: relative; | |
background: url(images/background-image.png); | |
} |
Have you ever wanted to get a specific data from another website but there's no API available for it? That's where Web Scraping comes in, if the data is not made available by the website we can just scrape it from the website itself.
But before we dive in let us first define what web scraping is. According to Wikipedia:
{% blockquote %} Web scraping (web harvesting or web data extraction) is a computer software technique of extracting information from websites. Usually, such software programs simulate human exploration of the World Wide Web by either implementing low-level Hypertext Transfer Protocol (HTTP), or embedding a fully-fledged web browser, such as Internet Explorer or Mozilla Firefox. {% endblockquote %}