Skip to content

Instantly share code, notes, and snippets.

@johnulist
johnulist / uri.js
Created January 13, 2014 11:07 — forked from jlong/uri.js
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"
// 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;
@johnulist
johnulist / SourceCodeSearchEngines.md
Created September 28, 2015 01:44 — forked from phillipalexander/SourceCodeSearchEngines.md
Source Code Search Engines You Can Use For Programming Projects

Source Code Search Engines

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.

@johnulist
johnulist / example.js
Created October 27, 2015 11:55 — forked from zobzn/example.js
Parsing URLs with the DOM!
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'
@johnulist
johnulist / parseUrl.js
Created October 27, 2015 11:56 — forked from Gioni06/parseUrl.js
Javascript Parse URLs
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(){
@johnulist
johnulist / parse-url.js
Created October 27, 2015 11:57 — forked from RockyMyx/parse-url.js
JavaScript: parse-url.js
//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];
@johnulist
johnulist / PrestaShop Constants
Created January 6, 2016 01:46
PrestaShop Constants
<?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.'/');
@johnulist
johnulist / prestashop-autocompletion.php
Created January 6, 2016 01:47 — forked from xbb/prestashop-autocompletion.php
Prestashop autocompletion
<?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 {}
@johnulist
johnulist / SPARQL-tests.md
Created April 27, 2016 15:59 — forked from ktk/SPARQL-tests.md
SPARQL performance tests

SPARQL CONSTRUCT comparison

I had some days left on a physical machine we used for an EU FP7 research project so I took the chance to compare 3 triplestores I or my colleagues worked with in the past months. I do not want to imply anything with this test, it's just me playing around and having fun with RDF. If you have any comments, add it here.

Hardware

The test platform comprises a dedicated server, not a virtual machine, with the following specification:

  • 2 x Intel Xeon E5 2620V2, 2 x (6 x 2.10 GHz) (appears as 24 cores in htop)
  • 128 GB buffered ECC RAM