Skip to content

Instantly share code, notes, and snippets.

View maxbrunsfeld's full-sized avatar

Max Brunsfeld maxbrunsfeld

View GitHub Profile
package unidecod2e
// AUTOGENERATED - DO NOT EDIT!
var somethingElse = "\n\n\n"
var tableData = "x\xda,\x9c\x05\\\x1cW\xd7\xc6\xf7\xcc\xec.]\x96e\x17[\xa8\x84\x92ThB\x02qwwwe\x80\t;\xd8\x00\xcbB ^\xb7\xd4ݛ\xba\xb7\x91\xb6\x91\xba[jI=\xa9\xbb\xc4]\xde\xef9\x0f\xdf\xef\xfd\x9d\xff\xb9\xf7̝;w\xce}\xe6\xec얼\x1e\x8f\xe8\xff\xc4\xf0\x88az\xc4\xf4z\xc4\xeb\xf3\x88\xcf\xef\x11\u007f\x92G\x92N\xf3\xc8i\x01\x8f\x04\x92=\x92\x1c\xf4H0\xc5#)!\x8f\x84R=\x92\x1a\xf6H8\xe2\x91H\x9aG\xd2\xd2=\x92\x9eᑌL\x8fdfy$+\xea\x91h\xb6G\xb2s<\x92s\xbaGN?\xc3#g\x9c\xe9\x913\xcf\xf2\xc8Ym<\xd2&\xd7#\xb9g{\xe4\xec<\x8f\xe4\xb5\xf5H\xdbv\x1eiw\x8eG\xce9\xd7#\xe7\x9e\xe7\x91\xf3\xce\xf7\xc8\xf9\xf9\x1eɿ\xc0#\x17\xb4\xf7H\xfb\x0e\x1e\xe9P\xe0\x91\x82\x8e\x1e\xe9\xd8\xc9#\x9d\n=RX䑢\xce\x1e\xe9\xdc\xc5#]\xbaz\xa4k7\x8ft\xeb\xee\x91\xee=<ң\xa7Gz\xf6\xf2H\xaf\xde\x1e\xe9\xdd\xc7#}\xfaz\xa4o?\x8f\xf4\xeb\xef\x91\xfe\x03<2`\xa0G\x06\x0e\xf2Ƞ\xc1\x1e\x19<\xc4#C\x86zd\xe80\x8f\f\x1b\xee\x91\xe1#<2b\xa4GF\x8e\xf2Ȩ\xd1\x1e\x19=\xc6#c\xc6zd\xec8\x8f\

Possible Resolution Criteria

1. Method Signatures

When listing the definitions for a given method call, filter out those method definitions whose signatures do not match the arguments passed in the call.

Example

class A:
<!DOCTYPE html>
<!-- This site was created in Webflow. http://www.webflow.com -->
<!-- Last Published: Sat Jun 09 2018 11:38:27 GMT+0000 (UTC) -->
<html data-wf-page="5af93e3da9b84e2a03b89ae0" data-wf-site="5af93e3da9b84e2196b89aab" lang="en">
<head>
<meta charset="utf-8">
<title>BoulderBox</title>
<meta content="Photo Gallery of BoulderBox, New Delhi" name="description">
<meta content="Photo Gallery of BoulderBox, New Delhi" property="og:description">
<meta content="width=device-width, initial-scale=1" name="viewport">
@maxbrunsfeld
maxbrunsfeld / output.json
Last active May 9, 2019 23:54
Converting raw Tree-sitter syntax tree to a strongly typed structure (TypeScript example)
root {
"name": {
"text": "foo"
},
"parameters": {
"type": "parameters"
},
"body": {
"statements": [
{
@maxbrunsfeld
maxbrunsfeld / memory-leak-notes.md
Last active September 11, 2017 22:04
Avoiding memory leaks when using event listeners in Atom

Preventing Memory Leaks

Cleaning up event listeners

When subscribing to events using methods like atom.workspace.onDidAddTextEditor, it is important remove the event listeners when you no longer need your callback to be called (e.g. when your package is deactivated). To do this, store the returned Disposable, and call .dispose on it:

module.exports = {
  activate () {
 this.editorSubscription = atom.workspace.onDidAddTextEditor(editor =&gt; {
```
Process: Atom [58160]
Path: /Applications/Atom.app/Contents/MacOS/Atom
Identifier: com.github.atom
Version: 1.0.12-dev-99e87bc (1.0.12-dev-99e87bc)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Atom [58160]
User ID: 501
@maxbrunsfeld
maxbrunsfeld / gist:1fff752aedd1b9c8bad0
Last active August 29, 2015 14:11
Proposed Config API
class Config
# Essential: Sets the value for a configuration setting, associated with a given
# file path.
#
# * `sourcePath` {String} the file path responsible for the setting
# * `scopeSelector` (optional) {String}. eg. '.source.ruby'
# See [the scopes docs](https://atom.io/docs/latest/advanced/scopes-and-scope-descriptors)
# for more information.
# * `keyPath` The {String} name of the key.
@maxbrunsfeld
maxbrunsfeld / gist:b2de34c2d04d068e3bc8
Last active August 29, 2015 14:02
executor drain problem - SIGQUIT stack trace
root@a1b24ad3-50f6-47d3-b7c0-c366698fdae0:/var/vcap/data/warden/depot# cat /tmp/log.txt
runtime.notetsleepg(0xc75c00, 0xffffffffffffffff)
/usr/local/go/src/pkg/runtime/lock_futex.c:190 +0x46 fp=0x7f993526bf48
runtime.signal_recv(0x7f99353eefb8)
/usr/local/go/src/pkg/runtime/sigqueue.goc:110 +0xe2 fp=0x7f993526bf70
os/signal.loop()
/usr/local/go/src/pkg/os/signal/signal_unix.go:21 +0x1e fp=0x7f993526bfa0
runtime.goexit()
@maxbrunsfeld
maxbrunsfeld / backbone_super.js
Created December 30, 2011 23:58
A 'super' method for backbone.js (plain javascript)
// This method gives you an easier way of calling super
// when you're using Backbone in plain javascript.
// It lets you avoid writing the constructor's name multiple
// times. You still have to specify the name of the method.
//
// So instead of having to write:
//
// User = Backbone.Model.extend({
// save: function(attrs) {
// this.beforeSave(attrs);