Skip to content

Instantly share code, notes, and snippets.

View junrillg's full-sized avatar
💻
Got something to work?

Junrill Galvez junrillg

💻
Got something to work?
View GitHub Profile
@junrillg
junrillg / WP:Set 404 in WordPress
Created August 26, 2015 16:52
WP:Set 404 in WordPress
global $wp_query;
$wp_query->set_404();
status_header(404);
@junrillg
junrillg / Bootstrap - Jumbotron
Created June 13, 2014 10:06
Starter Template for Bootstrap which is Jumbotron.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
@junrillg
junrillg / Cross-Browser Compatibility
Created June 14, 2014 15:09
Compass: Cross-Browser Compatibility
$experimental-support-for-mozilla: true;
$experimental-support-for-webkit: true;
$support-for-original-webkit-gradients: true;
$experimental-support-for-opera: true;
$experimental-support-for-microsoft: true;
$experimental-support-for-khtml: false;
html {
background: url('images/bg.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
@junrillg
junrillg / CSS:Vertically Centered Content
Created June 16, 2014 06:07
Centering a content inside a <div>
.container {
min-height: 6.5em;
display: table-cell;
vertical-align: middle;
}
@junrillg
junrillg / CSS: Gradients Template
Created June 16, 2014 06:09
CSS3 Gradient template with vendor prefixes
#colorbox {
background: #629721;
background-image: -webkit-gradient(linear, left top, left bottom, from(#83b842), to(#629721));
background-image: -webkit-linear-gradient(top, #83b842, #629721);
background-image: -moz-linear-gradient(top, #83b842, #629721);
background-image: -ms-linear-gradient(top, #83b842, #629721);
background-image: -o-linear-gradient(top, #83b842, #629721);
background-image: linear-gradient(top, #83b842, #629721);
}
@junrillg
junrillg / CSS: Zebra Striping a Table
Created June 16, 2014 06:12
CSS3 Zebra Striping a Table
tbody tr:nth-child(odd) {
background-color: #ccc;
}
@junrillg
junrillg / CSS: Inner Box Shadow
Created June 16, 2014 06:16
Inner CSS3 Box Shadow
#mydiv {
-moz-box-shadow: inset 2px 0 4px #000;
-webkit-box-shadow: inset 2px 0 4px #000;
box-shadow: inset 2px 0 4px #000;
}
@junrillg
junrillg / CSS: Outer Box Shadow
Created June 16, 2014 06:17
Outer CSS3 Box Shadow
#mydiv {
-webkit-box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.52);
-moz-box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.52);
box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.52);
}
@junrillg
junrillg / CSS: Hardboiled CSS3 Media Queries
Last active August 29, 2015 14:02
Hardboiled CSS3 Media Queries
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {