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
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
@-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
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
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
/** 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
#!/bin/sh | |
# Gets our drupal install rolling. | |
# place this in /usr/bin and chmod +x to make it usable globally. | |
# example use would be to create a site in virtualmin, cd to the root directory of the site and type "d_install" | |
if [ -e $1 ]; | |
then | |
echo -e "\e[31mERROR: please supply site password\e[0m" | |
exit 1 |
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
wordpress/wp-config.php | |
Paste the following code to your wp-config.php file, preferably just below every other line of code. | |
define('FS_METHOD','direct'); |
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
#!/bin/sh | |
# This is usually run by the d_install script (https://gist.github.com/treall/240b8408cd944c17551a) | |
# This script will: | |
# make sure you're in the correct directory, | |
# download the latest drupal 7 release, | |
# install our frequently used modules, | |
# setup the admin account, | |
# create an Aurora subtheme, | |
# update the .htaccess file for use on our outdated dev server, |
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
.cover { | |
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; | |
} |