Visit my blog or connect with me on Twitter
git init
or
Visit my blog or connect with me on Twitter
git init
or
<?php | |
class AbstractLogger extends AbstractLoggerCore {} | |
class Address extends AddressCore {} | |
class AddressFormat extends AddressFormatCore {} | |
class AdminTab extends AdminTabCore {} | |
class Alias extends AliasCore {} | |
class Attachment extends AttachmentCore {} | |
class Attribute extends AttributeCore {} | |
class AttributeGroup extends AttributeGroupCore {} |
<?php | |
define('PS_ROOT_DIR', realpath($currentDir.'/..')); | |
define('PS_CLASS_DIR', PS_ROOT_DIR.'/classes/'); | |
define('PS_TRANSLATIONS_DIR', PS_ROOT_DIR.'/translations/'); | |
define('PS_DOWNLOAD_DIR', PS_ROOT_DIR.'/download/'); | |
define('PS_MAIL_DIR', PS_ROOT_DIR.'/mails/'); | |
define('PS_MODULE_DIR', PS_ROOT_DIR.'/modules/'); | |
define('PS_ALL_THEMES_DIR', PS_ROOT_DIR.'/themes/'); | |
define('PS_THEME_DIR', PS_ROOT_DIR.'/themes/'.THEME_NAME.'/'); |
//http://tutorialzine.com/2013/07/quick-tip-parse-urls/ | |
$(function(){ | |
// The URL we want to parse | |
var url = 'http://tutorialzine.com/2013/07/quick-tip-parse-urls/?key=value#comments'; | |
// The magic: create a new anchor element, and set the URL as its href attribute. | |
// Notice that I am accessing the DOM element inside the jQuery object with [0]: | |
var a = $('<a>', { href:url } )[0]; |
function parseURL(url) { | |
var a = document.createElement('a'); | |
a.href = url; | |
return { | |
source: url, | |
protocol: a.protocol.replace(':',''), | |
host: a.hostname, | |
port: a.port, | |
query: a.search, | |
params: (function(){ |
var myURL = parseURL('http://abc.com:8080/dir/index.html?id=255&m=hello#top'); | |
myURL.file; // = 'index.html' | |
myURL.hash; // = 'top' | |
myURL.host; // = 'abc.com' | |
myURL.query; // = '?id=255&m=hello' | |
myURL.params; // = Object = { id: 255, m: hello } | |
myURL.path; // = '/dir/index.html' | |
myURL.segments; // = Array = ['dir', 'index.html'] | |
myURL.port; // = '8080' |
NOTE: This list is almost entirely copy/pasted from THIS awesome article. I've made my own personal edits (adding some additional content) which is why I keep it here.
Every day meanpath crawls over 200 million websites capturing the visible text, HTML source code, CSS and Javascript. This information is used by many companies to monitor the growth of web facing technology.
// http://stackoverflow.com/questions/18432577/stacked-tabs-in-bootstrap-3 | |
.tabs-below, .tabs-right, .tabs-left { | |
.nav-tabs { | |
border-bottom: 0; | |
} | |
} | |
.tab-content > .tab-pane, | |
.pill-content > .pill-pane { | |
display: none; |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |