Skip to content

Instantly share code, notes, and snippets.

@abbotto
abbotto / dPBLbO.markdown
Created April 13, 2015 16:47
Meta JS: Swap Positions
<small>Click the button: </small>
<button class='trigger'>Tiny Button</button>
@abbotto
abbotto / change_apache_webroot_osx
Last active December 4, 2015 16:16
Change web root path in Apache 2.4 on OS X Yosemite
RUN THIS COMMAND:
sudo nano /etc/apache2/httpd.conf
EDIT THESE LINES IN THE /etc/apache2/httpd.conf FILE:
- Uncomment: LoadModule php5_module libexec/apache2/libphp5.so
- Uncomment: LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
- Uncomment: LoadModule userdir_module libexec/apache2/mod_userdir.so
- Uncomment: LoadModule alias_module libexec/apache2/mod_alias.so
- Uncomment: LoadModule rewrite_module libexec/apache2/mod_rewrite.so
- In DocumentRoot Directory block change 'Options FollowSymLinks Multiviews' TO 'Options FollowSymLinks Multiviews Indexes'
@abbotto
abbotto / getComputedStyle.js
Created January 23, 2015 20:27
getComputedStyle Polyfill
if (!window.getComputedStyle) {
/**
* @param {(Element|null)} e
* @param {(null|string)=} t
* @return {(CSSStyleDeclaration|null)}
*/
window.getComputedStyle = function(e, t) {
return this.el = e, this.getPropertyValue = function(t) {
/** @type {RegExp} */
var n = /(\-([a-z]){1})/g;
@abbotto
abbotto / Event Registration JS
Created January 13, 2015 21:29
Cross-browser event registration
/*****************************************
* Events Max v10.0
* Enhanced cross-browser event handling
*
* This work is licensed under a Creative Commons Attribution 3.0 Unported License
* http://creativecommons.org/licenses/by/3.0/
*
* Author: Andy Harrison, http://dragonzreef.com/
* Date: 28 June 2012
*****************************************/