Skip to content

Instantly share code, notes, and snippets.

View jasonday's full-sized avatar
🎨
Dabbling

Jason Day jasonday

🎨
Dabbling
View GitHub Profile
@jasonday
jasonday / region-suggestion.md
Last active November 15, 2021 15:22
Drupal 8 Book module tree add region name to FILE NAME SUGGESTIONS
<!-- FILE NAME SUGGESTIONS:
   * book-tree--book-toc-180.html.twig
   * book-tree--book-toc-180--sidebar-first.html.twig
   x book-tree.html.twig
-->
  • The second suggestion is the new suggestion based on what region the block is placed in
  • This allows for targeted templates based on block placement
Collusion 1 = Trump Jr's emails with Russians
Collusion 2 = Trump Jr's meeting with Russians
Collusion 3 = Meeting included admitted “Russian informant” Natalia Veselnitskaya
Collusion 4 = Papadopoulos confession of Russian meetings
Collusion 5 = Flynn's confession of Russian meetings
Collusion 6 = Follow up emails with Russians
Collusion 7 = Gates hired a Russian spy
Collusion 8 = Cohen met with Russians in Prague in 2016
Collusion 9 = Seychelles meeting by Russians and Eric Prince
Collusion 10 = Russian Oligarch $500,000 in Payments to Michael Cohen
@jasonday
jasonday / bootstrap-accessible-tooltips.js
Created March 14, 2018 22:04
Bootstrap accessible tooltip: includes consideration for low dexterity
/*
* Dependencies:
* - Bootstrap: https://getbootstrap.com/docs/4.0/components/tooltips/
* - hoverIntent.js: https://github.com/tristen/hoverintent
*
* Demo: https://codepen.io/jasonday/pen/vRGXMv
*
*/
$(document).ready(function() {
/**
* llb datepicker widget
*
* @description: An extension of jquery UI datepicker
* that is keyboard accessible and will have
* aria labels for accessibility
*
* @example:
* require(['datepicker-widget'], function(datepicker) {
* datepicker.addDatePicker($(dateInputSelector), {
@jasonday
jasonday / dialog-datepicker.css
Last active November 9, 2016 22:12
jQuery UI Datepicker displayed in a jQuery Dialog
#ui-datepicker-div {
position: relative !important;
top: 0 !important;
left: 0 !important;
padding: 0;
display: block !important;
}
@jasonday
jasonday / gist:9cbaeed674fb22e2d54d
Created February 23, 2016 02:11
Pronamic google maps - post image as pin
/**
* Filter snippet
*
* @see https://developers.google.com/maps/documentation/javascript/reference#MarkerOptions
*/
function prefix_pronamic_google_maps_marker_options( $marker_options ) {
// icon - Icon for the foreground
$thumb_id = get_post_thumbnail_id();
$thumb_url_array = wp_get_attachment_image_src($thumb_id, array(100,100), true);
// perf stats
function getPerfStats() {
var timing = window.performance.timing;
var resourceList = window.performance.getEntriesByType("resource");
var ajaxReq = [];
for (i = 0; i < resourceList.length; i++) {
if (resourceList[i].initiatorType == "xmlhttprequest") {
ajaxReq.push({
name: resourceList[i].name,
time: resourceList[i].responseEnd - resourceList[i].startTime
@jasonday
jasonday / gist:5550879
Last active June 23, 2021 18:26
Responsive jQuery UI Dialog
// Demo: http://jsfiddle.net/jasonday/WxXLq/
// movemaine@gmail.com
$("#content").dialog({
width: 'auto', // overcomes width:'auto' and maxWidth bug
maxWidth: 600,
height: 'auto',
modal: true,
fluid: true, //new option
resizable: false