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
/* | |
in case you get errors like this | |
ruby:1: Invalid char `\x7F' in expression | |
ruby:1: Invalid char `\x01' in expression | |
ruby:1: Invalid char `\x01' in expression | |
ruby:1: Invalid char `\x01' in expression | |
ruby:1:in `<main>': uninitialized constant ELF (NameError) |
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
var hasNativeAudio = !!window.Audio; // cast to Boolean?, this is how Modernizr checks | |
// or | |
var hasNativeAudio = typeof window.Audio != 'undefined'; // check if defined | |
// or | |
var hasNativeAudio = 'Audio' in window; // check if in scope |
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
echo 'kern.maxfiles=20480' | sudo tee -a /etc/sysctl.conf | |
echo -e 'limit maxfiles 8192 20480\nlimit maxproc 1000 2000' | sudo tee -a /etc/launchd.conf | |
echo 'ulimit -n 4096' | sudo tee -a /etc/profile |
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
CPUCORECOUNT=$(cat /proc/cpuinfo | grep vendor_id | wc -l) && echo $(( CPUCORECOUNT == 0 ? 1 : CPUCORECOUNT )) |
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
@media print | |
{ | |
html:after{ | |
content:"Why would you print this?"; | |
font-size: 5em; | |
position: absolute; | |
width: 100%; | |
text-align: center; | |
} |
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
/** | |
* Move in a circle without wrapper elements | |
* Idea by Aryeh Gregor, simplified by Lea Verou | |
*/ | |
@keyframes rot { | |
from { | |
transform: rotate(0deg) | |
translate(-150px) | |
rotate(0deg); |
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
body{ display:block; }body:after{content:'';font-size: 1em;color: black;} | |
@media only screen and (min-device-width: 1cm){ body:after{content: 'min-device-width: 1cm'}} | |
@media only screen and (min-device-width: 2cm){ body:after{content: 'min-device-width: 2cm'}} | |
@media only screen and (min-device-width: 3cm){ body:after{content: 'min-device-width: 3cm'}} | |
@media only screen and (min-device-width: 4cm){ body:after{content: 'min-device-width: 4cm'}} | |
@media only screen and (min-device-width: 5cm){ body:after{content: 'min-device-width: 5cm'}} | |
@media only screen and (min-device-width: 6cm){ body:after{content: 'min-device-width: 6cm'}} | |
@media only screen and (min-device-width: 7cm){ body:after{content: 'min-device-width: 7cm'}} |
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 | |
*/ | |
div{ | |
margin: 100px auto; |
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 | |
*/ | |
div{ | |
margin: 100px auto; | |
height: 300px; | |
width: 300px; |
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 | |
*/ | |
div{ | |
margin: 100px auto; | |
height: 300px; | |
width: 400px; | |
background: red; | |
padding: 5px; |