Skip to content

Instantly share code, notes, and snippets.

Joel jtwalters

Block or report user

Report or block jtwalters

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View jquery-extend-3.4.0.js
/**
* For jQuery versions less than 3.4.0, this replaces the jQuery.extend
* function with the one from jQuery 3.4.0, slightly modified (documented
* below) to be compatible with older jQuery versions and browsers.
*
* This provides the Object.prototype pollution vulnerability fix to Drupal
* installations running older jQuery versions, including the versions shipped
* with Drupal core and https://www.drupal.org/project/jquery_update.
*
* @see https://github.com/jquery/jquery/pull/4333
@jtwalters
jtwalters / alter-table-node.sql
Created Feb 27, 2019
Use this SQL statement below on your _LOCAL_ environment to make the next created node match a specific NID.
View alter-table-node.sql
/*
Use the SQL statement below on your _LOCAL_ environment to make the next created node match a specific NID.
*/
ALTER TABLE node AUTO_INCREMENT = 123456
@jtwalters
jtwalters / README.md
Last active Apr 21, 2017
Better Filters for GitHub — Provides filters for GitHub Projects.
View README.md

Better Filters for GitHub was written to help a large Project board more manageable, by toggling the label display, and filtering down to issues tagged with a certain label or assignee.

It looks like this:

Install

@jtwalters
jtwalters / LakeUnion10K.csv
Last active Aug 15, 2016
2016 Lake Union 10K Results (as of 8/15) — CSV Download
View LakeUnion10K.csv
Rank Name Bib Time Time (Minutes) Pace Pace (Minutes) Hometown Division Div Rank
1 Andrew Ivanov 698 00:33:40 33.667 05:25 5.417 apt 534, WA m30-34 1
2 Jonathan Youell 1522 00:33:59 33.983 05:29 5.483 Boise, ID m25-29 1
3 Jalen Chase 299 00:34:11 34.183 05:30 5.500 New Town, ND m15-19 1
4 Lance Thompson 1387 00:34:18 34.300 05:32 5.533 US m35-39 1
5 Jacob Marsh 890 00:35:17 35.283 05:41 5.683 Seattle, WA m30-34 2
6 Zach Chupik 317 00:37:24 37.400 06:02 6.033 Bothell, WA m15-19 2
7 James Ebberson 425 00:37:27 37.450 06:02 6.033 Seattle, WA m30-34 3
8 Jamie Miller 952 00:37:29 37.483 06:02 6.033 Seattle, WA m35-39 2
9 Eduardo Carrillo 278 00:37:33 37.550 06:03 6.050 Lynnwood, WA m35-39 3
@jtwalters
jtwalters / parse-duration-to-seconds.js
Last active Mar 21, 2016
Parse DOM element's h:mm:ss to seconds and replace (in place).
View parse-duration-to-seconds.js
// Parse duration value from table cell, replacing as seconds...
$table.find('td:nth-child(7)').each(function () {
var value = this.innerHTML.trim(),
seconds = moment.duration(value).asSeconds();
this.innerHTML = seconds;
});
@jtwalters
jtwalters / convert-mm-ss-durations.js
Created Mar 21, 2016
Normalize m:ss, mm:ss, etc., to h:mm:ss
View convert-mm-ss-durations.js
$table.find('td:nth-child(7)').each(function () {
var value = this.innerHTML.trim(),
parts = value.split(':');
// convert mm:ss to hh:mm:ss
if (parts.length === 2) {
// zero-pad minutes
if (parts[0].length < 2) {
value = '0' + value;
}
this.innerHTML = '00:' + value;
View post-checkout
#!/bin/bash
CMD="chmod u+w sites/default"
echo "$CMD"
eval $CMD
View tabia.template.js
/**
* New Tabia/Components JS-pattern.
*/
// Loose augmentation pattern. Creates top-level namespace variable if it
// doesn't already exist.
var Tabia = Tabia || {};
// Create a base for this module's data and functions.
Tabia.myBehavior = {};
@jtwalters
jtwalters / jwalters.yaml
Last active Jan 1, 2016 — forked from doublejosh/favorite_work.yaml
Tableau Labels-based Issue Preference Profile
View jwalters.yaml
---
name: Joel Walters
email: jwalters@tableau.com
favSkills:
# Front-end
- skill-front
- tag-IE
- tag-mobile
- skill-ops
intSkills:
View auto-captions.js
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
window.videojs.plugin('autoCaptions', function () {
var player = this,
langMap = {
You can’t perform that action at this time.