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
Sed nec felis nulla! Etiam luctus luctus tellus consectetur accumsan. Etiam lacus neque; egestas non auctor sed, dapibus ac purus? Curabitur vitae enim magna. Praesent blandit tristique vulputate. Praesent id posuere eros! Nulla non quam et nisl vulputate adipiscing sed id nisl. Morbi venenatis, magna nec porta congue, dolor mi gravida lectus, nec imperdiet magna metus a felis. Ut tempor malesuada lorem; at pharetra erat egestas id. Duis leo quam, hendrerit ac sagittis nec, placerat quis dui. Pellentesque quis metus libero. Maecenas pharetra suscipit nunc scelerisque luctus. Nulla condimentum, mi cursus aliquam adipiscing, lectus felis laoreet eros, at fringilla ipsum erat vel magna! |
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
{exp:structure:nav max_depth="2" show_depth="2" current_class="active" css_class="nav" has_children_class="dropdown"} | |
<script> | |
$(function() { | |
$('ul li.dropdown').each(function() { | |
$(this).children('ul').addClass("dropdown-menu"); // add children dropdown menu class | |
$(this).children('a').append('<b class="caret"></b>') // add caret icon | |
$(this).clone().prependTo($(this).find('ul')).removeClass('dropdown active').children('ul').remove(); // clone parent link into child menu | |
$(this).children('a').attr('data-toggle', 'dropdown').attr('href', '#').addClass("dropdown-toggle"); // add data attributes to hook up Bootstrap | |
}); |
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
<ul id="nav"> | |
{exp:structure:entries} | |
<li class="top-level" id="{page_slug}"><a href="{page_url}">{title}</a> | |
{if children} | |
<ul class="dropdown"> | |
{children limit_depth="2"} | |
<li class="level-{depth}"><a href="{page_url}">{title}</a> | |
{/children} | |
</ul> | |
{/if} |
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
AcceptPathInfo On | |
Options -Indexes | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Looks for files and directories that do not exist | |
# and provide the segments to the index.php file | |
RewriteCond %{REQUEST_FILENAME} !-f |
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 : Meat Tornado | |
excerpt: Bacon ipsum dolor sit amet drumstick spare ribs pastrami ground round, jerky pork chuck pork chop ham hock tail corned beef chicken andouille tongue biltong. Venison short ribs swine meatball prosciutto strip steak pork, tongue pancetta ham jerky. Bacon pig filet mignon. | |
--- | |
Bacon ipsum dolor sit amet drumstick spare ribs pastrami ground round, jerky pork chuck pork chop ham hock tail corned beef chicken andouille tongue biltong. Venison short ribs swine meatball prosciutto strip steak pork, tongue pancetta ham jerky. Bacon pig filet mignon brisket pork beef, meatball shoulder turkey swine tongue. Andouille sausage shankle, beef ribs pancetta pork loin corned beef flank brisket meatloaf ham hock short loin pastrami. Leberkas capicola tail pork belly rump, pig spare ribs pork. | |
Drumstick prosciutto tail, ham hock pork loin swine tongue frankfurter cow andouille shankle sausage chuck boudin. Ham hock rump ribeye pork belly ball tip, salami pig jerky. Tri-tip bacon tenderloin, |
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: Big Healthy Green | |
ingredients: | |
- 6 to 8 kale leaves | |
- 2 to 4 stalks of celerey | |
- 3 to 4 carrots | |
- 2 apples | |
- 1 medium-sized cucumber | |
- 1 beet | |
- 1/2 lemon | |
directions: > |
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
RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$ | |
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L] |
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
// Add the following after line 8 of _app/_routes.php | |
if (substr($path, -5) == '.html') { | |
$path = str_replace('.html', '', $path); | |
} | |
And use the following .htaccess rule before your index.php rewrite: | |
RewriteRule ^([^.]+)$ /$1.html [R=301,L] |
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 | |
// Bad | |
$name = (!empty($_GET['name'])? $_GET['name'] : 'John'); | |
// Good | |
// Some basic sanitization. Make sure to clean further if inserting into database | |
$name = (!empty($_GET['name'])? $_GET['name'] : 'John'); | |
$name = strip_tags($name); | |
$name = htmlspecialchars($name, ENT_QUOTES); |
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 zipit { | |
local filename=$1 | |
if [ -z "$filename" ] ; then | |
filename=${PWD##*/}"-latest" | |
fi | |
git archive HEAD --format=zip > ~/Desktop/${filename}.zip | |
} |
OlderNewer