See comments in the files for explanation. This works flawlessly for me on MediaTemple + Git(Hub).
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
(function($) { | |
$.fn.konami = function(callback, code) { | |
if(code == undefined) code = "38,38,40,40,37,39,37,39,66,65"; | |
var kkeys=new Array(); | |
return this.each(function() { | |
$(this).keydown(function(e){ | |
kkeys.push( e.keyCode ); | |
if ( kkeys.toString().indexOf( code ) >= 0 ){ | |
$(this).unbind('keydown', arguments.callee); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Cross-browser kerning-pairs & ligatures</title> | |
<style> | |
body { font-family: sans-serif; background: rgba(30, 10, 0, 0.05); color: rgba(40, 30, 0, 1); width: 500px; margin: 80px auto; padding: 0px; } | |
a { color: rgba(15, 10, 0, 0.8); text-decoration: none; border-bottom: 1px solid; padding: 1px; -webkit-transition: background 1s ease; } | |
a:hover { background: rgba(0, 220, 220, 0.2); } | |
p { line-height: 1.5; padding: 0px 1em 0em 0em; } |
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 | |
// Dynamic paths for cross-server compatibility | |
$protocol = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ? "https://" : "http://"; | |
$base_url = $protocol . $_SERVER['HTTP_HOST']; | |
$base_path = $_SERVER['DOCUMENT_ROOT']; | |
$system_folder = "system"; | |
$images_folder = "images"; | |
$images_path = $base_path . "/" . $images_folder; |
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
# Git archiving | |
function git_archive() | |
{ | |
git archive --output="$1".zip HEAD $(git diff --name-only "$1" "$2" --stat) | |
} |
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 | |
/** | |
* Matrix Block | |
*/ | |
if( isset($importEntry->post) ) | |
{ | |
$matrixData = array( | |
'pageContent' => array( | |
'type' => 'text', | |
'enabled' => true, |
I hereby claim:
- I am radarseven on github.
- I am mreiner (https://keybase.io/mreiner) on keybase.
- I have a public key whose fingerprint is 8D8A 0216 8BC3 F316 AAB4 B282 64B1 1734 D629 3694
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
var businessingBiz = (function () { | |
var layerMeIn = function () { | |
var theSignOfTheBeast = 666; | |
var theShrugPerson = '\u00AF'+'\\_('+'\u30C4'+')_/'+'\u00AF'; | |
for (var i = 0; i <= theSignOfTheBeast; i++) { | |
alert(theShrugPerson); | |
} | |
}; |
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
{# How to handle querystring filters in a single Twig template. #} | |
{# Baseline entries/categories criteria. #} | |
{# Set any criteria here that will be relevant regardless of filters. #} | |
{# Section name can be array if you need to fetch from more than one section. #} | |
{% set criteria = { | |
section: ['sectionName'], | |
order: 'postDate desc', | |
limit: 9 | |
} %} |
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
{# Get the position of an entry in a Structure section. #} | |
{% macro getEntryPosition(entry, level) %} | |
{% spaceless %} | |
{% if entry is defined and entry|length and entry.section is defined and entry.section.type == 'structure' %} | |
{% set siblingIds = craft.entries.section(entry.section.handle).level(level|default(2)).ids() %} | |
{% set position = null %} | |
{% for siblingId in siblingIds %} | |
{% if position is null %} | |
{% set position = siblingId == entry.id ? loop.index : null %} | |
{% endif %} |
OlderNewer