Skip to content

Instantly share code, notes, and snippets.

View mattzeunert's full-sized avatar

Matt Zeunert mattzeunert

View GitHub Profile
We couldn’t find that file to show.
console.time("start")
var FINGER_SIZE_PX = 48;
// var checkOverlapBetweenFingers = false
// var scoreBasedOnOverlapArea = true
/**
* Merge client rects together and remove small ones. This may result in a larger overall
var FINGER_SIZE_PX = 48;
var checkOverlapBetweenFingers = false
var scoreBasedOnOverlapArea = true
function simplifyBCRs(bcrs) {
bcrs = bcrs.filter(bcr => {
var request = require("request");
app.get("/weather/:cityId", (req, res) => {
request("http://weatherapithing.com/" + req.params.cityId, function(
error,
response,
body
) {
console.log("error:", error); // Print the error if one occurred
res.header("Access-Control-Allow-Origin", "*");

Ran a test where I have a location in some minified code, then prettify that code and want to know the new location:

1154.107ms prettier formatWithCursor
 299.370ms pretty-fast (initial)
  25.215ms pretty-fast (cached source map)

Downsides of pretty-fast:

  • doesn't seem to support column-level mapping
function getLevelIndentation(level){
return level * 20 + "px";
}
window.devtoolsFormatters = [{
header: function(obj, config){
if (config && config.backboneModelFormatter){
return ["div", {}, config.key]
}
if (!(obj instanceof Backbone.Model)){
var REPEATS = 1000;
var _add = function (n1, n2) {
return n1 + n2;
}
a = 4;
b = 5;
var alternatives = [
{
--- Raw source ---
function add(a, b){
return a + b;
}
print(add(15, 19));
for (var i=0;i<1000;i++){
add(i, 22);
}