using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function loadTemplate($tpl = null) | |
{ | |
// Clear prior output | |
$this->_output = null; | |
$template = JFactory::getApplication()->getTemplate(); | |
$layout = $this->getLayout(); | |
$layoutTemplate = $this->getLayoutTemplate(); | |
// Create the template file name based on the layout | |
$file = isset($tpl) ? $layout . '_' . $tpl : $layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "title", | |
"intro_text": "text-block", | |
"date": "text-block", | |
"main_text": "text-block" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var initCalendar = function() | |
{ | |
var id = $(this).attr('id'); | |
var btnId = id + "_btn"; | |
$(btnId).setAttr('data-dayformat', "%Y-%m-%d"); | |
$(btnId).setAttr('data-firstday', 1); | |
JoomlaCalendar.init( $(this).parent('.field-calendar')[0] ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! CSS.supports() Polyfill | |
* https://gist.github.com/codler/03a0995195aa2859465f | |
* Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */ | |
if (!('CSS' in window)) { | |
window.CSS = {}; | |
} | |
if (!('supports' in window.CSS)) { | |
window.CSS._cacheSupports = {}; | |
window.CSS.supports = function(propertyName, value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Optimized MySQL configuration for cPanel servers by Fotis Evangelou - Updated July 2017 | |
# | |
# The settings provided below are a starting point for a 4GB - 8GB RAM server with 4 CPU cores. | |
# If you have less or more resources available you should adjust accordingly to save CPU, | |
# RAM and disk I/O usage. | |
# The settings marked with a specific comment or the word "UPD" after the value | |
# should be adjusted for your system by using MySQL DB diagnostics tools like: | |
# http://mysqltuner.com/ | |
# or | |
# https://launchpad.net/mysql-tuning-primer (supports MySQL up to v5.6) |
#Node - File Paths
##File Paths Node has a path module which can be used to manipulate paths.
###Normalizing Paths Paths can be stored in different ways and it is neccessary to ensure that the path is standardized.
var path = require('path');
path.normalize('/foo/bar//baz/asdf/quux/..');
I hereby claim:
- I am dgrammatiko on github.
- I am dgrammatiko (https://keybase.io/dgrammatiko) on keybase.
- I have a public key ASBZiLc6htQmRPSwVoRy1Do01lMMeu8Pkt3yZKCf3CbDaQo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
https://stackoverflow.com/questions/8917921/cross-browser-javascript-not-jquery-scroll-to-top-animation?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa | |
--> | |
<p>Very long page.Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Very long page. Ver |