Skip to content

Instantly share code, notes, and snippets.

@webkenny
webkenny / contact-scroll.js
Last active August 29, 2015 14:09
Link Pinned to Bottom of a Window on Scroll (Drupal 7 Javascript)
/*
Creates a behavior where a link will pin to the bottom of a screen out of a menu
when the scroll reaches 80 pixels or more. When the scroll goes below 80, it
resets.
Things you can (and should) edit:
- The scrollTop variable. When do you want to create the pinning effect?
- The class of your menu link
- Any CSS properties you want to set for the new element.
@webkenny
webkenny / .bashrc
Last active December 20, 2018 04:41
Run artisan command inside a Homestead VM from the local shell
#######################################
# Run artisan on the Homestead VM
#
# Arguments:
# Folder
# Command to Run
# Returns:
# Output of the Artisan Command
#######################################
function artisan() {
@webkenny
webkenny / dropzone.js
Created June 17, 2016 06:31
Using Dropzone with Bootstrap
$(document).ready(function () {
var previewNode = document.querySelector("#template");
previewNode.id = "";
var previewTemplate = previewNode.parentNode.innerHTML;
previewNode.parentNode.removeChild(previewNode);
var eventsDropzone = new Dropzone(document.body, {
// The configuration we've talked about above
thumbnailWidth: 80,
Last login: Sat Sep 3 12:46:48 on ttys002
+prompt_powerlevel9k_setup:24> [[ $(whence -w prompt_powerlevel9k_setup) -regex-match "function"+prompt_powerlevel9k_setup:24> whence -w prompt_powerlevel9k_setup
+prompt_powerlevel9k_setup:24> [[ $(whence -w prompt_powerlevel9k_setup) -regex-match "function" ]]
+prompt_powerlevel9k_setup:25> autoload -U is-at-least
+prompt_powerlevel9k_setup:26> is-at-least 5.0.8
+is-at-least:17> emulate -L zsh
+is-at-least:19> local 'IFS=.-' 'min_cnt=0' 'ver_cnt=0' part min_ver version
+is-at-least:21> min_ver=( 5 0 8 )
+is-at-least:22> version=( 5 0 8 0 )
+is-at-least:24> (( 0 <= 3 ))
name: IHM Premiere Prep Cart
description: Powers the My Cart functionality of Premiere Prep.
package: Custom
type: module
core: 8.x
dependencies:
- entityqueue:entityqueue
- drupal:views