Install package controller as per https://packagecontrol.io/installation
Install packages (special+shift+p)
All Autocomplete
function stringToCodePointsArray(inStr) { | |
var outArr = []; | |
for (const symbol of inStr) { | |
var point = symbol.codePointAt(0); | |
outArr.push(point); | |
// if (point !== 2028 && point !== 2029) { | |
// outArr.push(point); | |
// } | |
} | |
return outArr; |
<html> | |
<head> | |
<title>REST + jQuery Example</title> | |
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script> | |
<script type="text/javascript"> | |
// Requires jquery 3.1.0 | |
// Good resource for jQuery REST http://www.lm-tech.it/Blog/post/2013/05/08/How-to-consume-a-RESTful-service-using-jQuery.aspx | |
/** | |
* updates a form dropdown |
function stripCartId(mainObj) { | |
function nestedSearch(obj) { | |
Object.keys(obj).forEach(function (key) { | |
if (key === 'cart') { | |
delete obj[key].id; | |
} | |
if (typeof obj[key] === 'object') { | |
return nestedSearch(obj[key]); | |
} | |
}); |
'use strict'; | |
module.exports = function CustomError(message, extra) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = this.constructor.name; | |
this.message = message; | |
this.extra = extra; | |
}; | |
require('util').inherits(module.exports, Error); |
var original = myObj.funcName; | |
sinon.stub(myObj, 'funcName', function () { | |
console.log('stub for funcName'); | |
original.apply(myObj, arguments); | |
}); |
function roundToDecimal(val, decimals) { | |
return Number(Math.round(val+'e'+decimals)+'e-'+decimals); | |
} | |
var len = arguments.length; | |
for (var i = 1; i < len; i++) { | |
arguments[i]; | |
} |
Install package controller as per https://packagecontrol.io/installation
Install packages (special+shift+p)
All Autocomplete
// Based on results at http://jsperf.com/url-param-manipulation | |
// setURLParam returns a new queryString but not an entire URL | |
testURL: 'https://www.test.com?i=main&mode=front&sid=de8d49b78a85a322c4155015fdce22c4&enc=+Hello%20&empty&zpac=gooberface234324&a=3&b=4&c=5&d=11&e=15', | |
setURLParam: function( paramName, paramValue, urlString ) { | |
setURLParam: function( paramName, paramValue, urlString ) { | |
var urlParams = this.getURLParams( urlString ), | |
newParams = [], | |
foundParam = false; |
window.ParsleyConfig = { | |
errorClass: 'has-error', | |
successClass: 'has-success', | |
classHandler: function (ParsleyField) { | |
return ParsleyField.$element.parents('.form-group'); | |
}, | |
errorsContainer: function (ParsleyField) { | |
return ParsleyField.$element.parents('.form-group'); | |
}, | |
errorsWrapper: '<span class="help-block">', |
A theme for the sidebar in Sublime Text 3 to match the workspace of the Monokai Extended theme.
This theme only modifies the sidebar to better match the Monokai Extended theme, without modifying any of the styling elsewhere defined by Monokai Extended.
File location: SublimeText_ROOT\Data\Packages\User
For the Monkai Extended Theme, visit https://github.com/jonschlinkert/sublime-monokai-extended