This file contains hidden or 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
<a href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/9487/LV_MOTOR_DOCUMENT_OF_INSURANCE.pdf" target="_blank">HTML a href target _blank</a> | |
<a href="#0" onclick="window.open('https://s3-us-west-2.amazonaws.com/s.cdpn.io/9487/LV_MOTOR_DOCUMENT_OF_INSURANCE.pdf');">JS window.open()</a> | |
<a href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/9487/LV_MOTOR_DOCUMENT_OF_INSURANCE.pdf" download="Nice Name of Document.pdf">HTML5 download attribute</a> |
This file contains hidden or 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 | |
/** | |
* @package Joomla.Plugin | |
* @subpackage System.Overrides | |
* | |
* @copyright Copyright (C) 2012 Don Gilbert. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE | |
*/ | |
define('OVERRIDES', dirname(__FILE__).'/overrides'); |
This file contains hidden or 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
<div class="container"> | |
<div class="row"> | |
<div class="col-3"></div> | |
<div class="col-6 my-3"> | |
<div class="text-center"> | |
<h1>Main Title</h1> | |
</div> | |
<h2 class="my-4">Subtitle</h2> | |
<div class="row"> | |
<p>{articles category="category" tag="tag" ordering="title"}</p> |
This file contains hidden or 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
The code is a bit verbose -- deliberately so, so that you can see what's going on. | |
$('#my-select').on('chosen:showing_dropdown', function(event, params) { | |
var chosen_container = $( event.target ).next( '.chosen-container' ); | |
var dropdown = chosen_container.find( '.chosen-drop' ); | |
var dropdown_top = dropdown.offset().top - $(window).scrollTop(); | |
var dropdown_height = dropdown.height(); | |
var viewport_height = $(window).height(); | |
if ( dropdown_top + dropdown_height > viewport_height ) { |
This file contains hidden or 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
Using for loop | |
for host in docker1 docker2 docker3 docker4; do ssh pi@$host curl -sSL https://get.docker.com | sh; done |
This file contains hidden or 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
This step is optional, but it allow us to easily SSH into each node without using a password. | |
I'll use the ssh-copy-id command to copy my public key to the remote server. | |
If you don't have a key generated already, you can do so with: | |
ssh-keygen -t rsa | |
Hit enter twice and leave the passphrase empty (unless you really want to use a passphrase). |
This file contains hidden or 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 | |
/** | |
* @package Article Form override for Joomla 3 | |
* @copyright Copyright (c) 2014 Sander Potjer - www.perfectwebteam.nl | |
* @license GNU General Public License version 3 or later | |
*/ | |
defined('_JEXEC') or die; | |
JHtml::_('behavior.keepalive'); |