This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
<script src="/bower_components/foundation/js/foundation/foundation.accordion.js"></script> | |
<script> | |
//reflow after page load | |
$(document).foundation('accordion', 'reflow'); | |
//animate open/close | |
$(".accordion dd").on("click", "a:eq(0)", function (event) { | |
var dd_parent = $(this).parent(); |
This file contains 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
@mixin background-img ($img,$ext) { | |
background-image: url($img+'.'+$ext); | |
@media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2) { | |
&{ background-image: url($img + '@2x.' + $ext); } | |
} | |
} |
This file contains 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
@include font-face("AvenirNext-Regular", font-files("AvenirNext-Regular/AvenirNext-Regular.ttf", "AvenirNext-Regular/AvenirNext-Regular.otf"), "AvenirNext-Regular/AvenirNext-Regular.eot"); | |
@include font-face("ChaparralPro-Italic", font-files("ChaparralPro-Italic/ChaparralPro-Italic.ttf", "ChaparralPro-Italic/ChaparralPro-Italic.otf"), "ChaparralPro-Italic/ChaparralPro-Italic.eot"); | |
// For font path issues with this mixin, check this out: | |
// https://stackoverflow.com/questions/17734459/what-is-wrong-with-my-use-of-the-compass-font-face-mi |
This file contains 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
//------------------------------------------------------------------------------ | |
//Detect iPhone, iPod, iPad or mobile device | |
//------------------------------------------------------------------------------ | |
var isMobile = { | |
Android: function() { | |
return navigator.userAgent.match(/Android/i); | |
}, | |
BlackBerry: function() { | |
return navigator.userAgent.match(/BlackBerry/i); | |
}, |
This file contains 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
<?php | |
// Use this when posting a form via ajax | |
// - this file should be above the webroot | |
//Retrieve form data. | |
//GET - user submitted data using AJAX | |
//POST - in case user does not support javascript, we'll use POST instead | |
$name = ($_GET['name']) ? $_GET['name'] : $_POST['name']; | |
$email = ($_GET['email']) ?$_GET['email'] : $_POST['email']; | |
$messsage = ($_GET['message']) ?$_GET['message'] : $_POST['message']; |
This file contains 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
As seen [here](http://davidwalsh.name/update-submodules-git) | |
`$ git submodule update --init --recursive` |
This file contains 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
# Setting up a Local development Environment on OSX Mavericks | |
As seen [here](http://mallinson.ca/post/osx-web-development/) | |
1. Download Xcode (or run `xcode-select --install` and choose install) | |
2. Install Command Line Tools | |
3. Download and install MySQL | |
4. Set MySQL to launch on startup | |
5. Show hidden files on OSX by using `defaults write com.apple.finder AppleShowAllFiles YES` | |
5. Edit the Hosts file located at `/private/etc/hosts` |
This file contains 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
console.log('%c Oh I see, you wanna check out my code! ', 'background: #bada55; color: #222'); |
This file contains 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
@include keyframe(fadeout) { | |
0% { | |
opacity: 1; | |
} | |
100% { | |
opacity: 0; | |
} | |
} |