Log in to your Managed Hosting Server via SSH
Add these two lines to .bashrc:
/*global jQuery */ | |
;(function($) { | |
/*global document */ | |
"use strict"; | |
if (typeof document !== 'undefined' && ('classList' in document.createElement('a'))) { | |
var $ = jQuery; |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> | |
</head> | |
<body> | |
<iframe id="frame" style="width: 250px; border: solid 1px red;" ></iframe> | |
<script type="text/javascript"> | |
var elFrame = $('#frame')[0]; | |
$(elFrame.contentWindow).resize(function() { | |
$(window).trigger('zoom'); |
{# For this, I wanted the nav to show the top-level node and second-level nodes #} | |
{# when on level 1, and then show the second-level and its children when on #} | |
{# level 2 or level 3 (so we get good parent, child, and sibling navigation. #} | |
{# Requires string 'sectionName' to be passed with Structure section name #} | |
{% if entry.showLeftNavigation %} | |
<nav class="interior-page__nav"> |
/** | |
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
* | |
* This gist is no longer updated. Please use | |
* | |
* https://github.com/hashchange/marionette.handlebars | |
* | |
* instead. | |
* | |
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
var gulp = require('gulp'); | |
var myTransform = require('./myTransform'); | |
gulp.task('foobar', function (){ | |
return gulp.src("foobar.js") | |
.pipe(myTransform()) | |
.pipe(gulp.dest('.')); | |
}); |
/** | |
* Adjusts a number to a given precision, working around the buggy floating-point math of Javascript. Works for | |
* round, floor, ceil operations. | |
* | |
* Lifted from the Math.round entry of MDN. Minor changes without effect on the algorithm. | |
* | |
* @param {string} operation "round", "floor", "ceil" | |
* @param {number} value | |
* @param {number} [precision=0] can be negative: round( 104,-1 ) => 100 | |
* @returns {number} |
/** | |
* Returns the scroll target position for scrolling to the top of an element. | |
* | |
* Pass the result to a scrollTo method: | |
* | |
* - $scrollContainer.scrollTop( result ) for instant scrolling | |
* - $scrollContainer.scrollTo( result ) for animated scrolling with jQuery.scrollable | |
* | |
* @param {jQuery} $target the target element | |
* @param {jQuery} $scrollContainer either $(window), or a scrollable HTML element |
This is now part of craft-scripts: | |
https://github.com/nystudio107/craft-scripts |
The following will guide you through the process of enabling SSL on a Apache webserver
Create a directory within /etc/apache2/
using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys: