Visual Studio Web Development Tip - Add Chrome Incognito Mode as a Browser
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
Infrequently ran command line apps | |
npx speed-test -b | |
npx wifi-password-cli [your-wifi-network-name] | |
npx http-server -o [path] |
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]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[json]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"breadcrumbs.enabled": true, | |
"editor.fontFamily": "Fira Code, Consolas, 'Courier New', monospace", | |
"editor.fontLigatures": true, |
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:(function(){ localStorage.clear(); sessionStorage.clear(); var c = document.cookie.split("; "); for (i in c) { document.cookie =/^[^=]+/.exec(c[i])[0]+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; }; })(); |
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
myApp.directive("autotabOnMaxlength", function () { | |
return { | |
restrict: "A", | |
require: "ngModel", | |
link: function ($scope, element, attr, ctrl) { | |
ctrl.$viewChangeListeners.push(function () { | |
if (element.val().length == element.attr("maxlength")) { | |
var elems = Array.prototype.filter.call(document.querySelectorAll('input, select, textarea, button, [tabindex]'), function(elem) { | |
return (elem.offsetParent != null) && !elem.disabled; | |
}); |
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
/* Flattens a nested javascript object into a flat object with long keys with .'s and [0]'s */ | |
function FlattenJavaScriptObject(toFlatten, prefix) { | |
var result = {}; | |
var traveseObject = function (theObject, path) { | |
if (!(typeof theObject === 'string') && theObject instanceof Array) { | |
for (var i = 0; i < theObject.length; i++) { | |
var key = path + "[" + i + "]"; | |
if (typeof theObject[i] === 'string') { |
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
var Utils = (function () { | |
var M = {}; | |
var _somethingPrivate = function () { | |
return "pears"; | |
}; | |
M.apples = function () { | |
return "apples"; |
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
function numberOfLines(selector) { | |
return $(selector).height()/parseInt($(selector).css('lineHeight')); | |
} |
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
.main-header { | |
.nav { | |
background-color: black; | |
li { | |
display: inline-block; | |
} | |
a { | |
color: white; |
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
.main-header { | |
.nav { | |
background-color: black; | |
ul { | |
li { | |
display: inline-block; | |
a { |
NewerOlder