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
/** | |
* Vertical centering with Flexbox + margin fallback | |
* Lea Verou & David Storey | |
*/ | |
html, body { height: 100%; } | |
body { | |
width: 100%; /* needed for FF */ | |
margin: 0; |
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 first commented line is your dabblet’s title | |
*/ | |
.teaser { | |
overflow: hidden; | |
height: 250px; | |
display: inline-block; | |
position: relative; | |
outline:0 none} |
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
/** | |
* Scrolling shadows by @kizmarh and @leaverou | |
* Only works in browsers supporting background-attachment: local; & CSS gradients | |
* Degrades gracefully | |
*/ | |
html { | |
background: white; | |
font: 120% sans-serif; | |
} |
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
#!/usr/bin/env bash | |
#SCRIPT_PATH="$(readlink -f $0)" | |
#SCRIPT_DIR="$(dirname ${SCRIPT_PATH})" | |
SCRIPT_DIR="$(cd "$(dirname "$0")"; pwd)" | |
function deleteIfExisting { | |
local dirToDel="${SCRIPT_DIR}/${1}" | |
if [[ -w "${dirToDel}" ]] ; then | |
echo "Deleting '${dirToDel}' ..." |
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
@mixin sprite($width, $height, $x, $y, $asset : "../img/assets.png") { | |
width:$width; | |
height:$height; | |
background-image:url($asset); | |
background-position:$x $y; | |
background-repeat:no-repeat; | |
color:transparent !important; | |
text-indent:-999em; | |
padding:0; | |
display:inline-block; |
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
// @see http://css-tricks.com/snippets/php/get-current-page-url/?utm_source=dlvr.it&utm_medium=twitter | |
function getUrl() { | |
$url = @( $_SERVER["HTTPS"] != 'on' ) ? 'http://'.$_SERVER["SERVER_NAME"] : 'https://'.$_SERVER["SERVER_NAME"]; | |
$url .= ( $_SERVER["SERVER_PORT"] !== 80 ) ? ":".$_SERVER["SERVER_PORT"] : ""; | |
$url .= $_SERVER["REQUEST_URI"]; | |
return $url; | |
} |
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
// To test this code in Firefox, I encourage you to use Firefox Aurora | |
// and to include your script this way: | |
// <script type="application/javascript;version=1.8"> | |
/* let ********************************************* */ | |
// let is the new var :) | |
// Declares a block scope local variable | |
var a = 5; |
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
/** | |
* CSS Box model demo | |
*/ | |
#box { | |
width: 300px; | |
height: 200px; | |
padding: 20px; | |
border-width: 15px; | |
box-sizing: border-box; |
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
<IfModule mod_rewrite.c> | |
#Options +FollowSymLinks +ExecCGI | |
RewriteEngine On | |
#RewriteBase / | |
#RewriteBase /PHP/nfm-matenight-lottery/ | |
# This makes serves up the public asset if it exists | |
RewriteCond public/$1 -F | |
RewriteRule ^(.*)$ public/$1 [QSA,L] |
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
/** | |
* supplant() does variable substitution on the string. It scans through the string looking for | |
* expressions enclosed in { } braces. If an expression is found, use it as a key on the object, | |
* and if the key has a string value or number value, it is substituted for the bracket expression | |
* and it repeats. | |
* | |
* Written by Douglas Crockford | |
* http://www.crockford.com/ | |
*/ | |
String.prototype.supplant = function (o) { |