Skip to content

Instantly share code, notes, and snippets.

Outdated stub in index: jar:///home/imaman/code/hackathon-sample/wix-framework/bazelbeam-intellij-projects/wixrpc_21/libs/bazelbeam_1.jar!/com/wixpress/greyhound/config/Configuration.class indexed at 1555508993369 with document size -1, doc=null, docSaved=true, wasIndexedAlready=true, queried at 1555508993369
indexed lengths={chars=-1, bytes=8138}
doc length=-1
file length=0
cached PSI class org.jetbrains.plugins.scala.lang.psi.impl.ScalaFileImpl
projects with file: 1
java.lang.Exception
at com.intellij.psi.stubs.StubTreeLoaderImpl.diagnoseLengthMismatch(StubTreeLoaderImpl.java:180)
at com.intellij.psi.stubs.StubTreeLoaderImpl.checkLengthMatch(StubTreeLoaderImpl.java:150)
@imaman
imaman / cdp.js
Last active June 24, 2024 05:41
iframe inspection w/o getFlattenedDocument()
const CDP = require('chrome-remote-interface');
const chromeLauncher = require('chrome-launcher');
const util = require('util');
// cdp.js: a playground for using chrome-devtools-protocol.
// Plug-in your own code at the run() function, below.
//
// Usage:
// $ node scripts/cdp.js
//
@imaman
imaman / cdp.js
Created December 25, 2018 13:49
Drill info iframes which are not SAME_ORIGIN
const CDP = require('chrome-remote-interface');
const chromeLauncher = require('chrome-launcher');
// cdp.js: a playground for using chrome-devtools-protocol.
// Plug-in your own code at the run() function, below.
//
// Usage:
// $ node scripts/cdp.js
//
// This program requires node version >= 8.
@imaman
imaman / gist:0c428ccc0eac32b76f493fcaa7985571
Last active November 20, 2018 08:19
ts unit testing boilerplate
npm install --save-dev mocha ts-node chai chai-subset @types/chai @types/mocha @types/chai-subset
cp /dev/stdin src/u.test.ts <<EOF
import * as chai from 'chai';
import chaiSubset = require('chai-subset');
chai.use(chaiSubset);
const {expect} = chai;
@imaman
imaman / gist:2f990c0aa214b198054e6c76eea20bab
Created November 18, 2018 17:34
AWS lambda node.js context object
callbackWaitsForEmptyEventLoop;done;succeed;fail;logGroupName;logStreamName;functionName;memoryLimitInMB;functionVersion;getRemainingTimeInMillis;invokeid;awsRequestId;invokedFunctionArn"
@imaman
imaman / combined.log
Created November 15, 2018 10:17
update error: log + error message "cannot be executed in its current status of [CREATE_IN_PROGRESS]"
This file has been truncated, but you can view the full file.
2018-11-12T22:04:14.366Z [main] silly: Packagr.run(spec_compiled, spec_compiled, undefined)
2018-11-12T22:04:14.368Z [main] info: Compiling /home/imaman/code/data-platform/metric-machine/backend/a.servicemix.ts
2018-11-12T22:04:14.368Z [main] silly: Executing:
2018-11-12T22:04:16.591Z [main] silly: Packagr.run(build, build, undefined)
2018-11-12T22:04:16.591Z [main] info: Compiling /home/imaman/code/data-platform/metric-machine/backend/src/store/compute
2018-11-12T22:04:16.591Z [main] silly: Executing:
2018-11-12T22:04:20.684Z [main] silly: Packagr.run(build, build, undefined)
2018-11-12T22:04:20.684Z [main] info: Compiling /home/imaman/code/data-platform/metric-machine/backend/src/support/errorSink
2018-11-12T22:04:20.684Z [main] silly: Executing:
2018-11-12T22:04:22.158Z [main] silly: Packagr.run(build, build, undefined)
@imaman
imaman / combined.log
Created November 15, 2018 10:17
update error: log + error message "cannot be executed in its current status of [CREATE_IN_PROGRESS]"
This file has been truncated, but you can view the full file.
2018-11-12T22:04:14.366Z [main] silly: Packagr.run(spec_compiled, spec_compiled, undefined)
2018-11-12T22:04:14.368Z [main] info: Compiling /home/imaman/code/data-platform/metric-machine/backend/a.servicemix.ts
2018-11-12T22:04:14.368Z [main] silly: Executing:
2018-11-12T22:04:16.591Z [main] silly: Packagr.run(build, build, undefined)
2018-11-12T22:04:16.591Z [main] info: Compiling /home/imaman/code/data-platform/metric-machine/backend/src/store/compute
2018-11-12T22:04:16.591Z [main] silly: Executing:
2018-11-12T22:04:20.684Z [main] silly: Packagr.run(build, build, undefined)
2018-11-12T22:04:20.684Z [main] info: Compiling /home/imaman/code/data-platform/metric-machine/backend/src/support/errorSink
2018-11-12T22:04:20.684Z [main] silly: Executing:
2018-11-12T22:04:22.158Z [main] silly: Packagr.run(build, build, undefined)
@imaman
imaman / show_hiearchy.bash
Last active May 28, 2018 13:22
print hierarchy of JS classes
node -e "var p = 'src/locators/selectors'; var kids = fs.readdirSync(p).map(x => fs.readFileSync(p + '/' + x, 'utf-8')).join('\n').split('\n').filter(x => x.match(/class .*{/)).map(x => x.replace('class ', '').replace(' {', '').replace(' extends ', ' ')).map(x => x.split(' ')).reduce((kids, p) => { kids[p[1]] = kids[p[1]] || []; kids[p[1]].push(p[0]); return kids; }, {}); function pr(indentation, k) { console.log(indentation + k); (kids[k] || []).forEach(x => pr(indentation + ' ', x)); }; pr('');"