Skip to content

Instantly share code, notes, and snippets.

View mikeselander's full-sized avatar
:shipit:
Shipping

Mike Selander mikeselander

:shipit:
Shipping
View GitHub Profile
@scribu
scribu / backtrace-errors.php
Created October 14, 2010 07:25
Backtrace Errors
<?php
// Forked from: http://stackoverflow.com/questions/1159216/how-can-i-get-php-to-produce-a-backtrace-upon-errors/1159235#1159235
function process_error_backtrace($errno, $errstr, $errfile, $errline) {
if(!(error_reporting() & $errno))
return;
switch($errno) {
case E_WARNING :
case E_USER_WARNING :
case E_STRICT :
@mikeselander
mikeselander / css-cheatsheet.css
Created June 6, 2014 04:02
Basic CSS Selector Cheatsheet
/* Basic Selectors */
#name /* <div id='name'> */
.name{} /* <div class='name'> */
.parent.name{} /* <div class='parent name'> */
.parent .child{} /* Child Element <div class='parent'> <div class='child'> */
.parent > .child{} /* Direct Child Element ONLY (grandchildren will be ignored) */
.one + .two{} /* Directly Adjoining Elements <div class='one'></div> <div class='two'></div> */
.one ~ .two{} /* Any Following Elements */
/* dynamic selectors */