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 | |
} |
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
{{ the_grid }} | |
<div class="row"> | |
<h1>{{ caption }}</h1> | |
<p>{{ some_text }}</p> | |
</div> | |
{{ /the_grid }} |
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
<rewrite> | |
<rules> | |
<rule name="Imported Rule 1" stopProcessing="true"> | |
<match url="^(_config)" ignoreCase="false" /> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> | |
</rule> | |
<rule name="Imported Rule 2" stopProcessing="true"> | |
<match url="^(.*).yml$" ignoreCase="false" /> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> |
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
<rewrite> | |
<rules> | |
<rule name="Imported Rule 1" stopProcessing="true"> | |
<match url="^(_app)" ignoreCase="false" /> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> | |
</rule> | |
<rule name="Imported Rule 2" stopProcessing="true"> | |
<match url="^(_cache)" ignoreCase="false" /> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> | |
</rule> |
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
<h6 class="center">The Latest from <a href="/blog">My Journal</a></h6> | |
{{ entries:listing folder="blog" limit="5" }} | |
<div class="block entry"> | |
<header> | |
<h2 class="entry-title"><a href="{{ url }}">{{ title }}</a></h2> | |
<p class="entry-date"> {{ datestamp format="F jS, Y" }}</p> | |
</header> | |
{{ content|widont }} |
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> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style> | |
<body> | |
<div style="max-width:900px; -webkit-transform:rotate(0deg);"> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> |