Skip to content

Instantly share code, notes, and snippets.

View nelsonJM's full-sized avatar

Josh Nelson nelsonJM

View GitHub Profile
@nelsonJM
nelsonJM / gist:3954369
Created October 25, 2012 18:05
Compass: Grid ala CSS tricks
@import "normalize"; /* import your _normalize.scss file */
@import "compass";
* {
@include box-sizing(border-box);
}
$pad: 20px;
.grid {
background: white;
@nelsonJM
nelsonJM / gist:3954393
Created October 25, 2012 18:09
Compass: HTML template for grid
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="grid">
<div class="col-2-3">
@nelsonJM
nelsonJM / gist:3958468
Created October 26, 2012 12:19
CSS: Eric Meyer Reset
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@nelsonJM
nelsonJM / gist:3980398
Created October 30, 2012 14:14
PHP: Find Apache user
<?php
echo shell_exec('whoami');
@nelsonJM
nelsonJM / gist:3983034
Created October 30, 2012 21:01
JS: Feature Mask
<div id="feature-mask" style="display: none; position: absolute; width: 2771px; height: 2379px; ">
<img onload="javascript: setTimeout(function(){ hideHomepageMask(); }, 3000);" src="http://www.path/to/img" style="position: absolute; left: 159.5px; top: 0px; ">
</div>
<script type="text/javascript">
document.getElementById('feature-mask').style.display = 'block';
</script>
@nelsonJM
nelsonJM / gist:4111125
Created November 19, 2012 15:01
Robots: Ultimate robots.txt
User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins
Disallow: /wp-content/cache
Disallow: /wp-content/themes
Disallow: /trackback
Disallow: /comments
Disallow: /category/*/*
@nelsonJM
nelsonJM / gist:4354782
Created December 21, 2012 18:31
CSS: linear gradient button
#searchsubmit {
border: 1px solid #C1BBBB;
background: #DCDCDD;
background: -webkit-linear-gradient(top, #F7F7F7, #9A9898);
background: -moz-linear-gradient(top, #F7F7F7, #9A9898);
background: -ms-linear-gradient(top, #F7F7F7, #9A9898);
background: -o-linear-gradient(top, #F7F7F7, #9A9898);
padding: 3px 6px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
@nelsonJM
nelsonJM / WordPress:Breadcrumb function
Created January 11, 2013 21:52
Breadcrumb function for wp ecommerce and navxt to play together
function wordpress_breadcrumbs() {
global $post;
if(get_post_type($post) == 'wpsc-product'){
return true;
} else {
?>
<div class="breadcrumbs">
@nelsonJM
nelsonJM / gist:4597648
Created January 22, 2013 19:34
JS:Self-invoking anonymous function
(function($) {
})(jQuery);
@nelsonJM
nelsonJM / gist:4665339
Created January 29, 2013 16:01
JQuery: Document Ready
$(document).ready(function() {
});