Skip to content

Instantly share code, notes, and snippets.

View bugsyAlexander's full-sized avatar

Mynor Alexander bugsyAlexander

View GitHub Profile
/**
* A mixin which helps you to add depth to elements according to the Google Material Design spec:
* http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-dimensionality
*
* Please note that the values given in the specification cannot be used as is. To create the same visual experience
* the blur parameter has to be doubled.
*
* Adapted from a LESS version at https://medium.com/@Florian/freebie-google-material-design-shadow-helper-2a0501295a2d
*
* Original Author: Florian Kutschera (@gefangenimnetz), Conceptboard GmbH (@conceptboardapp)
@bugsyAlexander
bugsyAlexander / animationEnd_eventListener
Last active August 29, 2015 14:14
Cross-browser "AnimationEnd" event handler with animate.css
(function () {
var doc = document,
btnBtn = doc.getElementById("btnWrapper");
btnBtn.addEventListener("click", clickHandler, false);
function clickHandler(e) {
var target = e.target;
if (target.nodeName === "BUTTON") {
target.setAttribute("class", "animated " + target.innerHTML);
@bugsyAlexander
bugsyAlexander / CSS layers
Created January 5, 2015 23:11
one-liner code to display all CSS layers with multiple color outline
[].forEach.call($$("*"),function(a){
a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)
})
document.addEventListener("DOMContentLoaded", function () {
"use strict";
document.getElementById("tab-group").className = "ready";
var headerClass = "tab-header",
contentClass = "tab-content";
document.getElementById("tab-group").addEventListener("click", function (evt) {
var myHeader = evt.target;
"use strict";
document.addEventListener("DOMContentLoaded", drawMap);
var map, google;
function drawMap() {
var storeLocation = {
lat: 34.1032104,
lng: -118.326293
};
@bugsyAlexander
bugsyAlexander / angJS
Created October 11, 2014 02:30
angJS
open -a Google\ Chrome --args --disable-web-security -–allow-file-access-from-files
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
/* ========== animate =========== */
div.animate {
width: 200px;
height: 200px;
margin-top: 1rem;
background-color: coral;
-webkit-animation: square-to-circle 2s .5s infinite cubic-bezier(1,.015,.295,1.225) alternate;
-moz-animation: square-to-circle 2s .5s infinite cubic-bezier(1,.015,.295,1.225) alternate;
-ms-animation: square-to-circle 2s .5s infinite cubic-bezier(1,.015,.295,1.225) alternate;
-o-animation: square-to-circle 2s .5s infinite cubic-bezier(1,.015,.295,1.225) alternate;
*, *:before, *:after {
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
/* ===== Global styles =====*/
html{
background: #b1b1b1;
}
body{
font: 100% Georgia, "Times New Roman", Times, serif;
line-height: 1.4;
width: 70%;
margin: 0 auto;
}