Skip to content

Instantly share code, notes, and snippets.

@bassplayer7
bassplayer7 / sticky-sections.js
Created June 7, 2018 14:50
Sticky Section Handler that maps links to sections during page scroll
/**
* @by SwiftOtter, Inc. 12/13/17
* @website https://swiftotter.com
*
* Aspects: handles non-supporting browsers; integrates with smooth scrolling; maps parent links to related sections; with an
* optional attribute taking precedence if supplied; gracefully handles multiple sections per link if present;
* accommodates browser idiosyncrasies; disables link highlighting when link clicked and during scroll;
* adds class to navbar when stuck
**/
@bassplayer7
bassplayer7 / _fireworks.css
Created November 30, 2016 00:00
Start of fireworks display
@keyframes flash {
0% {
transform: scale(0.1);
opacity: 1;
}
80% {
transform: scale(2);
opacity: 1;
}
@bassplayer7
bassplayer7 / Transaction.php
Created October 16, 2016 00:01
Patch created multiple copies of _unserializeField()
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@bassplayer7
bassplayer7 / config.yaml
Created August 9, 2016 21:39
Example Vagrant Config for Magento2
# Save this and drag it onto puphpet.com as a start. Note that you should adjust the memory and CPUs and other things depending on your environment.
# Expects everything related to this vagrant instance to be in ./vagrant in relation to the rest of the project.
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/centos65-x64
box_url: puphpet/centos65-x64
var InputHandler = function InputHandler() {
var inputs = document.querySelectorAll('input'),
i = 0;
for (i; i < inputs.length; i++) {
inputs[i].addEventListener('focus', this.handleLabelState);
inputs[i].addEventListener('blur', this.handleLabelState);
}
};
@bassplayer7
bassplayer7 / FizzBuzzTest.php
Last active August 29, 2015 14:20
PHP User Group Kansas City May 6 - FizzBuzz using a switch statement
// This was a very rudimentry start but since I hadn't gotten to finishing, I'm posting it now.
require(__DIR__ . '/../FizzBuzz.php');
class FizzBuzzTest extends PHPUnit_Framework_TestCase
{
private $fizzBuzzOutput;
public function __construct()
{
$fizzBuzz = new FizzBuzz();
@bassplayer7
bassplayer7 / .gitignore
Created January 6, 2014 22:17
The ultimate Wordpress .gitignore template (with some Mac OSX lines)
# You can use this template file to ignore core Wordpress files so that conflicts don't arise as a result
# of upgrading Wordpress to a newer version.
# Note: the ! excludes files from being ignored. In other words the ! INCLUDES those files in the repository.
# Make sure we don't have any unneeded files in our git repo.
/*.php
/*.sh
/*.html
/*.txt
/wp-config.php