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
%display-block-hacked { | |
display: block; | |
*zoom: 1; | |
} | |
%clear-both { | |
clear : both; | |
} | |
%blank-as-table { |
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
/* | |
Scoped Media Query Mixins - an element query workaround. | |
@mixin respond-to-all : generates @media () {} | |
@mixin respond-to-screen : generates @media screen and () {} | |
@mixin respond-to-screen-only : generates @media screen only and () {} | |
Accepts the following input : |
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
<body> | |
<span id="a">red</span> | |
<span id="b">yellow</span> | |
<span id="n">Are you sure you want to start a new game?</span> | |
<span id="w">The %s player won. | |
Do you want to play a new game?</span> | |
<div id="game">It's the <span id="c"></span> player's move. | |
<table id="gameboard"> | |
<tr> | |
<td id="c-1-1"></td> |
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
@import "compass"; | |
/** | |
* Mixin scrollbar | |
*/ | |
@mixin scrollbar($size, $primary, $secondary: lighten($primary, 25%)) { | |
::-webkit-scrollbar { | |
width: $size; | |
height: $size; | |
} |
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 desktop-hidden class to any HTML tag that contains mobile specific content */ | |
.desktop-hidden { | |
*display:none !important; /* IE6-7 */ | |
} | |
@media \0 screen { | |
.desktop-hidden { | |
display:none !important; /* IE8 only */ |
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 | |
// Generate a formatted list with all superglobals | |
//---------------------------------------------------- | |
// Custom superglobal variable $_CUSTOM | |
$_CUSTOM = array('USERNAME' => 'john', 'USERID' => '18068416846'); | |
// List here whichever superglobals you want to print | |
// This could be your own custom superglobals | |
$globals = array( | |
'$_SERVER' => $_SERVER, '$_ENV' => $_ENV, |
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
// This code will only work if you use Sass 3.3 (or higher) | |
// Configuration : | |
// ----------------------------------------- | |
$screensizes : ( | |
'default' : 0 infinity, | |
'mobile' : 0 767px, | |
'phone' : 0 480px, | |
'tablet' : 481px 767px, |
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
// Some code is my own | |
// Some code is coming from https://github.com/adambom/Sass-Math/blob/master/math.scss | |
// Some code is coming from http://thesassway.com/advanced/inverse-trigonometric-functions-with-sass | |
// Some code coming from http://thesassway.com/advanced/math-sequences-with-sass | |
@function power($base, $exponent) { | |
$ret: 1; | |
@if $exponent > 0 { | |
@for $i from 1 through $exponent { | |
$ret: $ret * $base; |
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 | |
// PHP implementation of my solution for James Grimes's puzzle @ https://www.youtube.com/watch?v=K6Qc4oK_HqY | |
// The following function calculates the (only) self descriptive number for any number of digits | |
// | |
// With "self descriptive number", I mean : | |
// ------------------- | |
// The first digit tells me how many zeros are in the number | |
// The second digit tells me how many ones are in the number | |
// The third digit tells me how many twos are in the number |
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 repeat() { | |
eat(); | |
sleep(); | |
code(); | |
repeat(); | |
})(); |
OlderNewer