Skip to content

Instantly share code, notes, and snippets.

Fancy Slider

Based on dribbble shot by Kreativa Studio - https://dribbble.com/shots/2375246-Fashion-Butique-slider-animation

Fullscreen please. Looks best in Webkit browsers, because clip-path not working in FF/IE without SVG fallbacks, which I don't want to use in this demo. Not responsive atm, I will figure out something soon.

Features:

  1. Clip-path for image masking rectangle border (webkit only).
@waffledonkey
waffledonkey / pre-commit
Created May 4, 2018 21:33 — forked from IanVS/pre-commit
Git pre-commit hook to perform linting on only the changes which will be committed.
#!/bin/bash
#
# A hook script to perform linting before allowing a commit,
# to avoid unnecessary noise or extra work to rebase commits.
# Based on: http://stackoverflow.com/a/20480591/1435658
# Necessary to support .nvm and gitx
export PATH=/usr/local/bin/:$PATH
@waffledonkey
waffledonkey / random.js
Created January 25, 2018 16:20 — forked from kerimdzhanov/random.js
JavaScript: get a random number from a specific range
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random floating point number
*/
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}
@waffledonkey
waffledonkey / redis-migrate.sh
Created September 1, 2017 01:44 — forked from nicStuff/redis-migrate.sh
Comfort tool for migrating redis keys among instances. Supports KEYS syntax matching, authentication and TTL
#!/bin/bash
######
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
# TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
######
@waffledonkey
waffledonkey / default.js
Last active May 18, 2017 05:46
javascript Math.round monkey-patch
// monkey-patch Math.round because the way it works natively is feature-poor/unintuitive
// see: http://www.jacklmoore.com/notes/rounding-in-javascript/
//
Math._round = Math.round;
Math.round = function (value, decimals) {
if (arguments.length === 1)
{
return Math._round.apply(this, arguments);
}