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
/** MySQL settings - You can get this info from your web host */ | |
$env = $_SERVER['HTTP_HOST']; | |
if ($env == 'dev.local' || $env == 'www.dev.local') { | |
/** The name of the database for WordPress */ | |
define('DB_NAME', 'example'); | |
/** MySQL database username */ | |
define('DB_USER', 'example'); | |
/** Dev Server Creds */ | |
define('DB_PASSWORD', 'password'); |
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
transparent | |
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"> | |
black | |
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="> | |
source: http://css-tricks.com/snippets/html/base64-encode-of-1x1px-transparent-gif/ | |
<!-- --> |
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
switch (new Date().getDay()) { | |
case 0: | |
day = "Sunday"; | |
break; | |
case 1: | |
day = "Monday"; | |
break; | |
case 2: | |
day = "Tuesday"; | |
break; |
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
@-webkit-keyframes zoomit { | |
15%,40%,75%,100% { | |
-webkit-transform-origin: center center; | |
} | |
15% { | |
-webkit-transform: scale(1.2, 1.1); | |
} | |
40% { |
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 style = window.getComputedStyle(document.documentElement, null).getPropertyValue('font-size'), | |
fontSize = parseInt(style), | |
calcUnit = function(fn, unit) { | |
return fn(unit); | |
}, | |
px = function(rem) { | |
return rem * fontSize; | |
// rem -> px |
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 path = window.location.pathname.split('/')[1] || '/', | |
pageCheck = function(string) { | |
if (path === '/') { | |
path = 'home'; | |
} | |
if (path !== string) { | |
return false; | |
} | |
return true; |
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
// allow command-click and control-click to open new tab | |
if (event.metaKey || event.ctrlKey) { | |
return; | |
} else { | |
event.preventDefault(); | |
} |
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
gulp.task('jekyll', function(){ | |
return require('child_process').spawn('jekyll', ['serve', '--watch'], { stdio: 'inherit' }); | |
}); | |
gulp.task('default', ['jekyll']); |
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
<!doctype html> | |
<html lang="en" class="no-js no-touch" itemscope itemtype="http://schema.org/Article"> | |
<head> | |
<meta charset="utf-8" > | |
<meta name="description" content="Visual style guide used by this site."> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1"> | |
<meta itemprop="name" content="Visual Style Guide — Web Starter Kit"> | |
<meta itemprop="description" content="Visual style guide used by this site."> |
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
RewriteCond %{HTTPS} off [OR] | |
RewriteCond %{HTTP_HOST} ^domainname\.com* | |
RewriteRule ^(.*)$ https://www.domainname.com/$1 [L,R=301] |