Skip to content

Instantly share code, notes, and snippets.

💭
🦄 Hackin'

Beau beaucharman

💭
🦄 Hackin'
View GitHub Profile
View accessibility-considerations.md

Accessibilty Considerations

Images

  • Provide Alt attributes to describe what the subject of the image asset is.
  • Informative and descriptive file name (Great for SEO too :D).
  • For images that are for pure decoration, apply alt="null" and do not provide a title attribute to mark as safely ignore for Assistive Technology.

Anchors

View gist:e13ecd69ae3ed4fe6510
sudo nano ~/.bash_profile
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
PS1='\e[0;35m⌘\e[0;34m \w/\e[0m\e[0;32m$(parse_git_branch)\e[0m '
alias projectlt3="cd ~/Sites/lt3-development/"
@beaucharman
beaucharman / reclaim.txt
Created Jan 21, 2015
To reclaim ownership of the .npm directory execute `sudo chown -R $(whoami) ~/.npm`
View reclaim.txt
// To reclaim ownership of the .npm directory execute
sudo chown -R $(whoami) ~/.npm
@beaucharman
beaucharman / event.js
Last active Dec 14, 2015
event{} | JavaScript object | Cross Browser Event Handling
View event.js
/**
* Event
* ------------------------------------------------------------------------
* event{}
* @version 1.0 | April 23rd 2013
* @author Beau Charman | @beaucharman | http://beaucharman.me
* @link https://gist.github.com/beaucharman/5127116
* @method add
* @method remove
* @method getTarget
@beaucharman
beaucharman / ajax.demo.js
Last active Dec 16, 2015
ajax{} | JavaScript object | AJAX methods object
View ajax.demo.js
// examples
;(function () {
ajax.json('file.php', {best: "cats", awesome: "javascript"}, function (json) {
var foo = document.getElementById('foo');
for (var ii = 0, len = json.length; ii < len; ii++) {
foo.innerHTML += '<li>' + json[ii].name + ': ' + json[ii].details + '</li>';
}
});
@beaucharman
beaucharman / roundTo.js
Last active Dec 16, 2015
roundTo( ) | JavaScript function | A JavaScript function that returns a float to a given number of decimal places, can also transpose the decimal place if needed.
View roundTo.js
/**
* RoundTo
* ------------------------------------------------------------------------
* roundTo()
* @version 1.0 | April 18th 2013
* @author Beau Charman | @beaucharman | http://www.beaucharman.me
* @link https://gist.github.com/beaucharman/5401683
* @param {float} n | the subject number we are rounding
* @param {integer} d | the number to decimal places to round to
* @param {string} dir | 'round', 'floor' or 'ceil'
@beaucharman
beaucharman / equalHeight.js
Last active Dec 20, 2015
Apply equal height to a group of provided elements, based on the tallest element
View equalHeight.js
/**
* Equal Height
* ======================================================================== */
(function ($) {
$.fn.equalheight = function () {
var tallest = 0;
var height = 0;
//var offest = 0;
var $elements = $(this);
var resizeElements = function () {
View getQueryVars.js
/**
* Get Query Vars
*/
var getUrlVars = function () {
var vars = [];
var hash;
var href = window.location.href;
if (href.indexOf('#') !== -1) {
href = href.substr(0, href.indexOf('#'));
}
View jquery.accessibleDropDownMenu.js
/**
* accessibleDropDownMenu.js
*
* jquery.accessibleDropDownMenu.js
* @version 2.0 | 14th January 2014
* @author Beau Charman | @beaucharman | http://www.beaucharman.github.io
* @link https://gist.github.com/beaucharman/7348970 |
* http://jsfiddle.net/beaucharman/X2ArC/
* @license MIT license
*/
@beaucharman
beaucharman / jquery.equalHeightColumns.js
Last active Dec 31, 2015
Responsive, Equal Height Columns
View jquery.equalHeightColumns.js
/**
*
* Equal Height Columns
*
* Horizontally Even Columns
*
* @param {object}
* @param {boolean} 'responsive'
* @param {integer} 'responsiveDelay'
* @param {string} 'bindTo'
You can’t perform that action at this time.