This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Assorted 1-liners that are very useful to eliminate repetition **/ | |
const siblings = (ele) => [].slice.call(ele.parentNode.children).filter((child) => child !== ele); | |
/** | |
CanIUse.com Helper - prompt for a keyword then display the correct caniuse.com page. | |
Save this as a bookmark in the Bookmark Bar for quick access to CanIUse.com pages. | |
NOTE: Use the minified version below for the URL of the bookmark. | |
**/ | |
/** Minified: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Don't forget to include: | |
// https://raw.github.com/say2joe/jquery.cache/master/jquery.cache.js | |
var myApp = { | |
appInfo: { | |
description: "Caching paradigm for JavaScript Applications", | |
title: "jQuery App DOM Cache" | |
}, | |
appProperty: (function(j){ | |
return (j = jQuery.noConflict()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sets the html of an element with "Loading ..." and continues to print a dot up to 20 times. | |
// If the element is ready to be updated with actual content, simply clearInterval($el[0].interval); | |
// Requires: jQuery v1.4+ | |
$el.html(function(i,html){ | |
this.intcount = 0; | |
this.interval = ($.proxy(function(el){ | |
return setInterval(function(){ | |
if (++el.intcount < 20) el.innerHTML += '.'; | |
else clearInterval(el.interval); | |
}, 500); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Please save all your work in https://jsfiddle.net/ | |
// Return the link to your work | |
// Answer five out of the seven questions | |
// Use test data when provided, however your functions should work with any similiarly structured data | |
// Use any additional libraries you like | |
// 1: Refactor this function to make it scalable. | |
var goto = function(evt, where, project, scenario, item, id){ | |
if (evt && evt.stopPropagation){ evt.stopPropagation(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-04-11T12:55:45.965Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
css: "path/to/cssForPrinting.css", | |
print: function(DOMobj){ | |
var winPrinter = window.open('', "SLPPrinter", "width=900,height=525,top=150,left=150,toolbars=no,scrollbars=yes,status=no,resizable=yes"), | |
html = (DOMobj.jquery)? DOMobj.parent().html() : (DOMobj.parentNode)? DOMobj.parentNode.innerHTML : (DOMobj.innerHTML || ''); | |
if (document.createStyleSheet) document.createStyleSheet(this.css); else // Dynamically added CSS is different for IE. | |
$("head",winPrinter.document).append($("<link/>").attr({ rel: "stylesheet", type: "text/css", href: this.css })); | |
$("body",winPrinter.document).append(html); winPrinter.focus(); winPrinter.print(); winPrinter.close(); | |
return DOMobj; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['rit','util/router','navIndicator'], function(RIT,Router) { | |
var $ = RIT.$, _ = RIT._, B = RIT.Backbone, Events = RIT.Events, self; | |
/** | |
* iEnside (/w enside.html) supports legacy Toyota connect and technology pages. | |
* Example uses include (URLs in browser's location / address bar, not iframe): | |
* http://local.rit.toyota.com/entune/enside.html#!/entune/learning-center/new-index.html | |
* http://local.rit.toyota.com/entune/enside.html#!phones (uses urls property object) | |
* http://local.rit.toyota.com/entune/enside.html (uses default route, "defRoute") | |
* @type {Router} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -s # || sudo -i | |
apt install apt-transport-https | |
add-apt-repository -y ppa:danielrichter2007/grub-customizer | |
add-apt-repository -y ppa:nilarimogard/webupd8 # WoeUSB | |
add-apt-repository -y ppa:yannubuntu/boot-repair | |
# Set up-to-date mirror for apt | |
# Check distros for errors | |
software-properties-gtk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#takes one argument/parameter: the name of the package which didn't install correctly and should be removed along with its dependencies | |
#example: ./opkgremovepartlyinstalledpackage.sh pulseaudio-daemon | |
#get list of all packages that would be installed along with package x | |
PACKAGES=`opkg --force-space --noaction install $1 | grep "http:" | cut -f 2 -d ' ' | sed 's/\.$//'` | |
opkg update | |
for i in $PACKAGES | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:if(!Custom)var Custom={};if(!Custom.UI)Custom.UI={};Custom.UI.TaskSelection=(function(){var userOptions={id:"rctsDD",css:"position: absolute;",options:["Implement Java code for task","Implement JS changes for task","Implement CSS changes for task","Implement XSL changes for task","Code Review (if needed) for task","JUnit Testing for task","Test Case Update for task","Test Case Review for task","Test Case Creation for task","Test Case Execution for task"]},targetId="name0";return{DropDown:(function(opts,s){s.addEventListener("keypress",function(e){if(e.keyCode==13)this.hide();},false);s.addEventListener("change",this.hide,false);for(var i=0,l=opts.options.length;i<l;i++){s.add(new Option(opts.options[i]),null);} with(s){id=opts.id;style.cssText=opts.css;style.display="none";size=1;} return document.body.appendChild(s);})(userOptions,document.createElement("select")),getTarget:function(){var el=(document.getElementById(targetId)||this.lkTarget);el.style.position="relative";return el;},getID:function( |
NewerOlder