id
stringlengths
34
124
type
stringclasses
4 values
prompt
stringlengths
0
4.95k
response
stringlengths
21
4.89k
source_lang
stringclasses
3 values
target_lang
stringclasses
2 values
repo
stringclasses
75 values
path
stringlengths
10
88
license
stringclasses
1 value
commit
stringlengths
40
40
stars
int64
431
18.7k
source_url
stringlengths
86
176
line_start
int64
1
214
line_end
int64
3
253
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript footer: addr: item.shortenedAddr obj = 'pretty-error': header: header if traceItems.length > 0 obj['pretty-error'].trace = traceItems obj for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, pr...
var i, len, obj, prop, ref; ({ footer: { addr: item.shortenedAddr } }); obj = { 'pretty-error': { header: header } }; if (traceItems.length > 0) { obj['pretty-error'].trace = traceItems; } obj; ref = ['renderer']; for (i = 0, len = ref.length; i < len; i++) { prop = ref[i]; (function() { ...
CoffeeScript
JavaScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
8b158eb81c88ba85701f53bbb7de0183094ad676
1,524
https://github.com/AriaMinaei/pretty-error/blob/8b158eb81c88ba85701f53bbb7de0183094ad676/scripts/coffee/lib/PrettyError.coffee
106
125
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var i, len, obj, prop, ref; ({ footer: { addr: item.shortenedAddr } }); obj = { 'pretty-error': { header: header } }; if (traceItems.length > 0) { obj['pretty-error'].trace = traceItems; } obj; ref = ['renderer']; for (i = 0, len = ref.length...
footer: addr: item.shortenedAddr obj = 'pretty-error': header: header if traceItems.length > 0 obj['pretty-error'].trace = traceItems obj for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, prop.length) PrettyError::__defineGetter__ prop, -> do @[...
JavaScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
8b158eb81c88ba85701f53bbb7de0183094ad676
1,524
https://github.com/AriaMinaei/pretty-error/blob/8b158eb81c88ba85701f53bbb7de0183094ad676/scripts/coffee/lib/PrettyError.coffee
106
125
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:completion
completion
footer: addr: item.shortenedAddr obj = 'pretty-error': header: header if traceItems.length > 0
obj['pretty-error'].trace = traceItems obj for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, prop.length) PrettyError::__defineGetter__ prop, -> do @[methodName]
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
8b158eb81c88ba85701f53bbb7de0183094ad676
1,524
https://github.com/AriaMinaei/pretty-error/blob/8b158eb81c88ba85701f53bbb7de0183094ad676/scripts/coffee/lib/PrettyError.coffee
106
125
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:raw_corpus
raw_corpus
footer: addr: item.shortenedAddr obj = 'pretty-error': header: header trace: traceItems obj for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, prop.length) PrettyError::__defineGetter__ prop, -> do @[methodName]
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
267b7ee078d601c3c96a773ce3ce31e65028b570
1,524
https://github.com/AriaMinaei/pretty-error/blob/267b7ee078d601c3c96a773ce3ce31e65028b570/scripts/coffee/lib/PrettyError.coffee
106
123
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript footer: addr: item.shortenedAddr obj = 'pretty-error': header: header trace: traceItems obj for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, prop.length) PrettyError::__defineGetter__ prop, ...
var i, len, obj, prop, ref; ({ footer: { addr: item.shortenedAddr } }); obj = { 'pretty-error': { header: header, trace: traceItems } }; obj; ref = ['renderer']; for (i = 0, len = ref.length; i < len; i++) { prop = ref[i]; (function() { var methodName; methodName = '_get' + prop[0].t...
CoffeeScript
JavaScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
267b7ee078d601c3c96a773ce3ce31e65028b570
1,524
https://github.com/AriaMinaei/pretty-error/blob/267b7ee078d601c3c96a773ce3ce31e65028b570/scripts/coffee/lib/PrettyError.coffee
106
123
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var i, len, obj, prop, ref; ({ footer: { addr: item.shortenedAddr } }); obj = { 'pretty-error': { header: header, trace: traceItems } }; obj; ref = ['renderer']; for (i = 0, len = ref.length; i < len; i++) { prop = ref[i]; (function() { ...
footer: addr: item.shortenedAddr obj = 'pretty-error': header: header trace: traceItems obj for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, prop.length) PrettyError::__defineGetter__ prop, -> do @[methodName]
JavaScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
267b7ee078d601c3c96a773ce3ce31e65028b570
1,524
https://github.com/AriaMinaei/pretty-error/blob/267b7ee078d601c3c96a773ce3ce31e65028b570/scripts/coffee/lib/PrettyError.coffee
106
123
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:completion
completion
footer: addr: item.shortenedAddr obj = 'pretty-error': header: header
trace: traceItems obj for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, prop.length) PrettyError::__defineGetter__ prop, -> do @[methodName]
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
267b7ee078d601c3c96a773ce3ce31e65028b570
1,524
https://github.com/AriaMinaei/pretty-error/blob/267b7ee078d601c3c96a773ce3ce31e65028b570/scripts/coffee/lib/PrettyError.coffee
106
123
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:raw_corpus
raw_corpus
unless typeof skipModules is 'boolean' or Array.isArray skipModules throw Error "skipModules only accepts a boolean or an array of module names" header = kind: e.kind colon: ':' message: e.message traceItems = [] for item, i in e.trace if skipModules isnt no and i > 0 continue if skipM...
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
a4cfabedc4ed8207d1a66f3ef866291d702e8a87
1,524
https://github.com/AriaMinaei/pretty-error/blob/a4cfabedc4ed8207d1a66f3ef866291d702e8a87/scripts/coffee/lib/PrettyError.coffee
56
105
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript unless typeof skipModules is 'boolean' or Array.isArray skipModules throw Error "skipModules only accepts a boolean or an array of module names" header = kind: e.kind colon: ':' message: e.message traceItems = [] for item, i in e.trace ...
var header, i, item, j, len, obj, ref, ref1, traceItems, indexOf = [].indexOf; if (!(typeof skipModules === 'boolean' || Array.isArray(skipModules))) { throw Error("skipModules only accepts a boolean or an array of module names"); } header = { kind: e.kind, colon: ':', message: e.message }; traceItems = []...
CoffeeScript
JavaScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
a4cfabedc4ed8207d1a66f3ef866291d702e8a87
1,524
https://github.com/AriaMinaei/pretty-error/blob/a4cfabedc4ed8207d1a66f3ef866291d702e8a87/scripts/coffee/lib/PrettyError.coffee
56
105
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var header, i, item, j, len, obj, ref, ref1, traceItems, indexOf = [].indexOf; if (!(typeof skipModules === 'boolean' || Array.isArray(skipModules))) { throw Error("skipModules only accepts a boolean or an array of module names"); } header = { kind: e.kind,...
unless typeof skipModules is 'boolean' or Array.isArray skipModules throw Error "skipModules only accepts a boolean or an array of module names" header = kind: e.kind colon: ':' message: e.message traceItems = [] for item, i in e.trace if skipModules isnt no and i > 0 continue if skipM...
JavaScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
a4cfabedc4ed8207d1a66f3ef866291d702e8a87
1,524
https://github.com/AriaMinaei/pretty-error/blob/a4cfabedc4ed8207d1a66f3ef866291d702e8a87/scripts/coffee/lib/PrettyError.coffee
56
105
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:completion
completion
unless typeof skipModules is 'boolean' or Array.isArray skipModules throw Error "skipModules only accepts a boolean or an array of module names" header = kind: e.kind colon: ':' message: e.message traceItems = [] for item, i in e.trace if skipModules isnt no and i > 0 continue if skipM...
pointer: do -> unless item.file? return '' { file: item.file colon: ':' line: item.line } what: item.what footer: addr: item.shortenedAddr obj = 'pretty-error': header: header
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
a4cfabedc4ed8207d1a66f3ef866291d702e8a87
1,524
https://github.com/AriaMinaei/pretty-error/blob/a4cfabedc4ed8207d1a66f3ef866291d702e8a87/scripts/coffee/lib/PrettyError.coffee
56
105
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:raw_corpus
raw_corpus
trace: traceItems obj for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, prop.length) PrettyError::__defineGetter__ prop, -> do @[methodName]
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
a4cfabedc4ed8207d1a66f3ef866291d702e8a87
1,524
https://github.com/AriaMinaei/pretty-error/blob/a4cfabedc4ed8207d1a66f3ef866291d702e8a87/scripts/coffee/lib/PrettyError.coffee
106
115
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:completion
completion
trace: traceItems obj
for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, prop.length) PrettyError::__defineGetter__ prop, -> do @[methodName]
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
a4cfabedc4ed8207d1a66f3ef866291d702e8a87
1,524
https://github.com/AriaMinaei/pretty-error/blob/a4cfabedc4ed8207d1a66f3ef866291d702e8a87/scripts/coffee/lib/PrettyError.coffee
106
115
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:4:raw_corpus
raw_corpus
trace: traceItems obj toMarkup: (e, skipModules = no) -> unless e instanceof ParsedError e = new ParsedError e unless typeof skipModules is 'boolean' or Array.isArray skipModules throw Error "skipModules only accepts a boolean or an array of module names" header = do -> kind = wrap 'kind', q e...
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
fc8c237668e5fd4c5a30adf54285cc829047d7ea
1,524
https://github.com/AriaMinaei/pretty-error/blob/fc8c237668e5fd4c5a30adf54285cc829047d7ea/scripts/coffee/lib/PrettyError.coffee
112
161
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:4:completion
completion
trace: traceItems obj toMarkup: (e, skipModules = no) -> unless e instanceof ParsedError e = new ParsedError e unless typeof skipModules is 'boolean' or Array.isArray skipModules throw Error "skipModules only accepts a boolean or an array of module names" header = do -> kind = wrap 'kind', q e...
traceItems = '' for item, i in e.trace if skipModules isnt no and i > 0 continue if skipModules is yes and item.modName is '[current]' continue if item.modName in skipModules itemHeader = do -> pointer = do -> unless item.file? return '' file = wrap 'file', q item.file ...
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
fc8c237668e5fd4c5a30adf54285cc829047d7ea
1,524
https://github.com/AriaMinaei/pretty-error/blob/fc8c237668e5fd4c5a30adf54285cc829047d7ea/scripts/coffee/lib/PrettyError.coffee
112
161
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:5:raw_corpus
raw_corpus
what = wrap 'what', q item.what or '' wrap 'header', pointer + what itemFooter = do -> addr = wrap 'addr', q item.shortenedAddr wrap 'footer', addr traceItems += wrap 'item', itemHeader + itemFooter trace = wrap 'trace', traceItems markup = wrap 'pretty-error', header + trace markup fo...
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
fc8c237668e5fd4c5a30adf54285cc829047d7ea
1,524
https://github.com/AriaMinaei/pretty-error/blob/fc8c237668e5fd4c5a30adf54285cc829047d7ea/scripts/coffee/lib/PrettyError.coffee
162
186
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:5:completion
completion
what = wrap 'what', q item.what or '' wrap 'header', pointer + what itemFooter = do -> addr = wrap 'addr', q item.shortenedAddr wrap 'footer', addr traceItems += wrap 'item', itemHeader + itemFooter
trace = wrap 'trace', traceItems markup = wrap 'pretty-error', header + trace markup for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, prop.length) PrettyError::__defineGetter__ prop, -> do @[methodName]
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
fc8c237668e5fd4c5a30adf54285cc829047d7ea
1,524
https://github.com/AriaMinaei/pretty-error/blob/fc8c237668e5fd4c5a30adf54285cc829047d7ea/scripts/coffee/lib/PrettyError.coffee
162
186
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:raw_corpus
raw_corpus
module.exports = class PrettyError self = @ @_getDefaultStyle: -> defaultStyle() constructor: -> @_renderer = new RenderKid @_style = self._getDefaultStyle() @_renderer.style @_style getStyle: -> @_style appendStyle: (toAppend) -> object.appendOnto @_style, toAppend @_renderer.style toApp...
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a
1,524
https://github.com/AriaMinaei/pretty-error/blob/df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a/scripts/coffee/lib/PrettyError.coffee
12
61
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class PrettyError self = @ @_getDefaultStyle: -> defaultStyle() constructor: -> @_renderer = new RenderKid @_style = self._getDefaultStyle() @_renderer.style @_style getStyle: -> @_style appendStyle: (toAppend) -> obje...
var PrettyError; module.exports = PrettyError = (function() { var self; class PrettyError { static _getDefaultStyle() { return defaultStyle(); } constructor() { this._renderer = new RenderKid(); this._style = self._getDefaultStyle(); this._renderer.style(this._style); } ...
CoffeeScript
JavaScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a
1,524
https://github.com/AriaMinaei/pretty-error/blob/df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a/scripts/coffee/lib/PrettyError.coffee
12
61
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PrettyError; module.exports = PrettyError = (function() { var self; class PrettyError { static _getDefaultStyle() { return defaultStyle(); } constructor() { this._renderer = new RenderKid(); this._style = self._getDefaultSty...
module.exports = class PrettyError self = @ @_getDefaultStyle: -> defaultStyle() constructor: -> @_renderer = new RenderKid @_style = self._getDefaultStyle() @_renderer.style @_style getStyle: -> @_style appendStyle: (toAppend) -> object.appendOnto @_style, toAppend @_renderer.style toApp...
JavaScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a
1,524
https://github.com/AriaMinaei/pretty-error/blob/df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a/scripts/coffee/lib/PrettyError.coffee
12
61
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:completion
completion
module.exports = class PrettyError self = @ @_getDefaultStyle: -> defaultStyle() constructor: -> @_renderer = new RenderKid @_style = self._getDefaultStyle() @_renderer.style @_style getStyle: -> @_style appendStyle: (toAppend) -> object.appendOnto @_style, toAppend
@_renderer.style toAppend @ _getRenderer: -> @_renderer render: (e, logIt = no, skipModules = no) -> markup = @toMarkup e, skipModules rendered = @_renderer.render(markup) if logIt is yes console.log rendered rendered toMarkup: (e, skipModules = no) -> unless e instanceof ParsedError ...
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a
1,524
https://github.com/AriaMinaei/pretty-error/blob/df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a/scripts/coffee/lib/PrettyError.coffee
12
61
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:raw_corpus
raw_corpus
unless typeof skipModules is 'boolean' or Array.isArray skipModules throw Error "skipModules only accepts a boolean or an array of module names" header = do -> kind = wrap 'kind', q e.kind colon = wrap 'colon', ':' message = wrap 'message', q e.message wrap 'header', kind + colon + '&nbsp;' + mes...
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a
1,524
https://github.com/AriaMinaei/pretty-error/blob/df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a/scripts/coffee/lib/PrettyError.coffee
62
111
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript unless typeof skipModules is 'boolean' or Array.isArray skipModules throw Error "skipModules only accepts a boolean or an array of module names" header = do -> kind = wrap 'kind', q e.kind colon = wrap 'colon', ':' message = wrap 'message', q e...
var header, i, item, itemFooter, itemHeader, j, len, ref, ref1, traceItems, indexOf = [].indexOf; if (!(typeof skipModules === 'boolean' || Array.isArray(skipModules))) { throw Error("skipModules only accepts a boolean or an array of module names"); } header = (function() { var colon, kind, message; kind = wr...
CoffeeScript
JavaScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a
1,524
https://github.com/AriaMinaei/pretty-error/blob/df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a/scripts/coffee/lib/PrettyError.coffee
62
111
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var header, i, item, itemFooter, itemHeader, j, len, ref, ref1, traceItems, indexOf = [].indexOf; if (!(typeof skipModules === 'boolean' || Array.isArray(skipModules))) { throw Error("skipModules only accepts a boolean or an array of module names"); } header ...
unless typeof skipModules is 'boolean' or Array.isArray skipModules throw Error "skipModules only accepts a boolean or an array of module names" header = do -> kind = wrap 'kind', q e.kind colon = wrap 'colon', ':' message = wrap 'message', q e.message wrap 'header', kind + colon + '&nbsp;' + mes...
JavaScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a
1,524
https://github.com/AriaMinaei/pretty-error/blob/df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a/scripts/coffee/lib/PrettyError.coffee
62
111
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:3:completion
completion
unless typeof skipModules is 'boolean' or Array.isArray skipModules throw Error "skipModules only accepts a boolean or an array of module names" header = do -> kind = wrap 'kind', q e.kind colon = wrap 'colon', ':' message = wrap 'message', q e.message wrap 'header', kind + colon + '&nbsp;' + mes...
itemHeader = do -> pointer = do -> unless item.file? return '' file = wrap 'file', q item.file colon = wrap 'colon', ':' line = wrap 'line', q item.line file + colon + line what = wrap 'what', q item.what or '' wrap 'header', pointer + what itemFooter = do -> ...
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a
1,524
https://github.com/AriaMinaei/pretty-error/blob/df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a/scripts/coffee/lib/PrettyError.coffee
62
111
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:4:raw_corpus
raw_corpus
traceItems += wrap 'item', itemHeader + itemFooter trace = wrap 'trace', traceItems markup = wrap 'pretty-error', header + trace markup for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, prop.length) PrettyError::__defineGetter__ prop, -> do @[methodName]
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a
1,524
https://github.com/AriaMinaei/pretty-error/blob/df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a/scripts/coffee/lib/PrettyError.coffee
112
125
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:4:completion
completion
traceItems += wrap 'item', itemHeader + itemFooter trace = wrap 'trace', traceItems markup = wrap 'pretty-error', header + trace markup
for prop in ['renderer'] then do -> methodName = '_get' + prop[0].toUpperCase() + prop.substr(1, prop.length) PrettyError::__defineGetter__ prop, -> do @[methodName]
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a
1,524
https://github.com/AriaMinaei/pretty-error/blob/df4b5c1c23fa43fe5d3cb6362bdbde1b45fef77a/scripts/coffee/lib/PrettyError.coffee
112
125
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:raw_corpus
raw_corpus
module.exports = class PrettyError self = @ @_getDefaultStyle: -> defaultStyle() constructor: -> @_renderer = new RenderKid @_style = self._getDefaultStyle() @_renderer.style @_style getStyle: -> @_style appendStyle: (toAppend) -> object.appendOnto @_style, toAppend @_renderer.style toApp...
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
f4d5dd691ed4f9eaa59ca7589e007dd352406dcd
1,524
https://github.com/AriaMinaei/pretty-error/blob/f4d5dd691ed4f9eaa59ca7589e007dd352406dcd/scripts/coffee/lib/PrettyError.coffee
12
61
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class PrettyError self = @ @_getDefaultStyle: -> defaultStyle() constructor: -> @_renderer = new RenderKid @_style = self._getDefaultStyle() @_renderer.style @_style getStyle: -> @_style appendStyle: (toAppend) -> obje...
var PrettyError; module.exports = PrettyError = (function() { var self; class PrettyError { static _getDefaultStyle() { return defaultStyle(); } constructor() { this._renderer = new RenderKid(); this._style = self._getDefaultStyle(); this._renderer.style(this._style); } ...
CoffeeScript
JavaScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
f4d5dd691ed4f9eaa59ca7589e007dd352406dcd
1,524
https://github.com/AriaMinaei/pretty-error/blob/f4d5dd691ed4f9eaa59ca7589e007dd352406dcd/scripts/coffee/lib/PrettyError.coffee
12
61
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PrettyError; module.exports = PrettyError = (function() { var self; class PrettyError { static _getDefaultStyle() { return defaultStyle(); } constructor() { this._renderer = new RenderKid(); this._style = self._getDefaultSty...
module.exports = class PrettyError self = @ @_getDefaultStyle: -> defaultStyle() constructor: -> @_renderer = new RenderKid @_style = self._getDefaultStyle() @_renderer.style @_style getStyle: -> @_style appendStyle: (toAppend) -> object.appendOnto @_style, toAppend @_renderer.style toApp...
JavaScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
f4d5dd691ed4f9eaa59ca7589e007dd352406dcd
1,524
https://github.com/AriaMinaei/pretty-error/blob/f4d5dd691ed4f9eaa59ca7589e007dd352406dcd/scripts/coffee/lib/PrettyError.coffee
12
61
AriaMinaei/pretty-error:scripts/coffee/lib/PrettyError.coffee:2:completion
completion
module.exports = class PrettyError self = @ @_getDefaultStyle: -> defaultStyle() constructor: -> @_renderer = new RenderKid @_style = self._getDefaultStyle() @_renderer.style @_style getStyle: -> @_style appendStyle: (toAppend) -> object.appendOnto @_style, toAppend
@_renderer.style toAppend @ _getRenderer: -> @_renderer render: (e, logIt = no, skipModules = no) -> markup = @toMarkup e, skipModules @_renderer.render(markup).then (rendered) -> if logIt is yes console.log rendered rendered toMarkup: (e, skipModules = no) -> unless e instanceof Parse...
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/PrettyError.coffee
MIT
f4d5dd691ed4f9eaa59ca7589e007dd352406dcd
1,524
https://github.com/AriaMinaei/pretty-error/blob/f4d5dd691ed4f9eaa59ca7589e007dd352406dcd/scripts/coffee/lib/PrettyError.coffee
12
61
meltingice/psd.js:lib/psd/util.coffee:1:raw_corpus
raw_corpus
module.exports = pad2: (i) -> (i + 1) & ~0x01 pad4: (i) -> ((i + 4) & ~0x03) - 1 getUnicodeCharacter: (cp) -> if cp >= 0 and cp <= 0xD7FF or cp >= 0xE000 and cp <= 0xFFFF return String.fromCharCode(cp) else if cp >= 0x10000 and cp <= 0x10FFFF # we substract 0x10000 from cp to get a 20-bits num...
CoffeeScript
meltingice/psd.js
lib/psd/util.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/util.coffee
1
23
meltingice/psd.js:lib/psd/util.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = pad2: (i) -> (i + 1) & ~0x01 pad4: (i) -> ((i + 4) & ~0x03) - 1 getUnicodeCharacter: (cp) -> if cp >= 0 and cp <= 0xD7FF or cp >= 0xE000 and cp <= 0xFFFF return String.fromCharCode(cp) else if cp >= 0x10000 and cp <= 0x10FFFF ...
module.exports = { pad2: function(i) { return (i + 1) & ~0x01; }, pad4: function(i) { return ((i + 4) & ~0x03) - 1; }, getUnicodeCharacter: function(cp) { var first, second; if (cp >= 0 && cp <= 0xD7FF || cp >= 0xE000 && cp <= 0xFFFF) { return String.fromCharCode(cp); } else if (cp >...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/util.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/util.coffee
1
23
meltingice/psd.js:lib/psd/util.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { pad2: function(i) { return (i + 1) & ~0x01; }, pad4: function(i) { return ((i + 4) & ~0x03) - 1; }, getUnicodeCharacter: function(cp) { var first, second; if (cp >= 0 && cp <= 0xD7FF || cp >= 0xE000 && cp <= 0xFFFF) { ...
module.exports = pad2: (i) -> (i + 1) & ~0x01 pad4: (i) -> ((i + 4) & ~0x03) - 1 getUnicodeCharacter: (cp) -> if cp >= 0 and cp <= 0xD7FF or cp >= 0xE000 and cp <= 0xFFFF return String.fromCharCode(cp) else if cp >= 0x10000 and cp <= 0x10FFFF # we substract 0x10000 from cp to get a 20-bits num...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/util.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/util.coffee
1
23
meltingice/psd.js:lib/psd/util.coffee:1:completion
completion
module.exports = pad2: (i) -> (i + 1) & ~0x01 pad4: (i) -> ((i + 4) & ~0x03) - 1 getUnicodeCharacter: (cp) -> if cp >= 0 and cp <= 0xD7FF or cp >= 0xE000 and cp <= 0xFFFF return String.fromCharCode(cp) else if cp >= 0x10000 and cp <= 0x10FFFF # we substract 0x10000 from cp to get a 20-bits num...
# we add 0xD800 to the number formed by the first 10 bits # to give the first byte first = ((0xffc00 & cp) >> 10) + 0xD800 # we add 0xDC00 to the number formed by the low 10 bits # to give the second byte second = (0x3ff & cp) + 0xDC00 String.fromCharCode(first) + String.fromCharCo...
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/util.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/util.coffee
1
23
meltingice/psd.js:lib/psd/util.coffee:1:raw_corpus
raw_corpus
module.exports = class Util @pad2: (i) -> (i + 1) & ~0x01 @pad4: (i) -> ((i + 4) & ~0x03) - 1 @getUnicodeCharacter: (cp) -> if cp >= 0 and cp <= 0xD7FF or cp >= 0xE000 and cp <= 0xFFFF return String.fromCharCode(cp) else if cp >= 0x10000 and cp <= 0x10FFFF # we substract 0x10000 from cp to get...
CoffeeScript
meltingice/psd.js
lib/psd/util.coffee
MIT
1bd1167c249ee8402f56c540910e27e68450e78e
2,846
https://github.com/meltingice/psd.js/blob/1bd1167c249ee8402f56c540910e27e68450e78e/lib/psd/util.coffee
1
20
meltingice/psd.js:lib/psd/util.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class Util @pad2: (i) -> (i + 1) & ~0x01 @pad4: (i) -> ((i + 4) & ~0x03) - 1 @getUnicodeCharacter: (cp) -> if cp >= 0 and cp <= 0xD7FF or cp >= 0xE000 and cp <= 0xFFFF return String.fromCharCode(cp) else if cp >= 0x10000 and c...
var Util; module.exports = Util = class Util { static pad2(i) { return (i + 1) & ~0x01; } static pad4(i) { return ((i + 4) & ~0x03) - 1; } static getUnicodeCharacter(cp) { var first, second; if (cp >= 0 && cp <= 0xD7FF || cp >= 0xE000 && cp <= 0xFFFF) { return String.fromCharCode(cp);...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/util.coffee
MIT
1bd1167c249ee8402f56c540910e27e68450e78e
2,846
https://github.com/meltingice/psd.js/blob/1bd1167c249ee8402f56c540910e27e68450e78e/lib/psd/util.coffee
1
20
meltingice/psd.js:lib/psd/util.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Util; module.exports = Util = class Util { static pad2(i) { return (i + 1) & ~0x01; } static pad4(i) { return ((i + 4) & ~0x03) - 1; } static getUnicodeCharacter(cp) { var first, second; if (cp >= 0 && cp <= 0xD7FF || cp >= 0xE000 &...
module.exports = class Util @pad2: (i) -> (i + 1) & ~0x01 @pad4: (i) -> ((i + 4) & ~0x03) - 1 @getUnicodeCharacter: (cp) -> if cp >= 0 and cp <= 0xD7FF or cp >= 0xE000 and cp <= 0xFFFF return String.fromCharCode(cp) else if cp >= 0x10000 and cp <= 0x10FFFF # we substract 0x10000 from cp to get...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/util.coffee
MIT
1bd1167c249ee8402f56c540910e27e68450e78e
2,846
https://github.com/meltingice/psd.js/blob/1bd1167c249ee8402f56c540910e27e68450e78e/lib/psd/util.coffee
1
20
meltingice/psd.js:lib/psd/util.coffee:1:completion
completion
module.exports = class Util @pad2: (i) -> (i + 1) & ~0x01 @pad4: (i) -> ((i + 4) & ~0x03) - 1 @getUnicodeCharacter: (cp) -> if cp >= 0 and cp <= 0xD7FF or cp >= 0xE000 and cp <= 0xFFFF return String.fromCharCode(cp) else if cp >= 0x10000 and cp <= 0x10FFFF # we substract 0x10000 from cp to get...
# we add 0xD800 to the number formed by the first 10 bits # to give the first byte first = ((0xffc00 & cp) >> 10) + 0xD800 # we add 0xDC00 to the number formed by the low 10 bits # to give the second byte second = (0x3ff & cp) + 0xDC00 String.fromCharCode(first) + String.fromCharCo...
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/util.coffee
MIT
1bd1167c249ee8402f56c540910e27e68450e78e
2,846
https://github.com/meltingice/psd.js/blob/1bd1167c249ee8402f56c540910e27e68450e78e/lib/psd/util.coffee
1
20
meltingice/psd.js:lib/psd/util.coffee:1:raw_corpus
raw_corpus
module.exports = class Util @pad2: (i) -> (i + 1) & ~0x01 @pad4: (i) -> ((i + 4) & ~0x03) - 1
CoffeeScript
meltingice/psd.js
lib/psd/util.coffee
MIT
c3e7db58a568a9cbfa31ebf197e062844c3f6015
2,846
https://github.com/meltingice/psd.js/blob/c3e7db58a568a9cbfa31ebf197e062844c3f6015/lib/psd/util.coffee
1
3
meltingice/psd.js:lib/psd/util.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class Util @pad2: (i) -> (i + 1) & ~0x01 @pad4: (i) -> ((i + 4) & ~0x03) - 1 ```
var Util; module.exports = Util = class Util { static pad2(i) { return (i + 1) & ~0x01; } static pad4(i) { return ((i + 4) & ~0x03) - 1; } };
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/util.coffee
MIT
c3e7db58a568a9cbfa31ebf197e062844c3f6015
2,846
https://github.com/meltingice/psd.js/blob/c3e7db58a568a9cbfa31ebf197e062844c3f6015/lib/psd/util.coffee
1
3
meltingice/psd.js:lib/psd/util.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Util; module.exports = Util = class Util { static pad2(i) { return (i + 1) & ~0x01; } static pad4(i) { return ((i + 4) & ~0x03) - 1; } }; ```
module.exports = class Util @pad2: (i) -> (i + 1) & ~0x01 @pad4: (i) -> ((i + 4) & ~0x03) - 1
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/util.coffee
MIT
c3e7db58a568a9cbfa31ebf197e062844c3f6015
2,846
https://github.com/meltingice/psd.js/blob/c3e7db58a568a9cbfa31ebf197e062844c3f6015/lib/psd/util.coffee
1
3
littlebee/git-time-machine:lib/git-revision-view.coffee:2:raw_corpus
raw_corpus
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
33777ed924ef5a8349c8207f2250a0af9aa12beb
1,111
https://github.com/littlebee/git-time-machine/blob/33777ed924ef5a8349c8207f2250a0af9aa12beb/lib/git-revision-view.coffee
10
59
littlebee/git-time-machine:lib/git-revision-view.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in ...
var GitRevisionView; GitRevisionView = (function() { class GitRevisionView { /* This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in ...
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
33777ed924ef5a8349c8207f2250a0af9aa12beb
1,111
https://github.com/littlebee/git-time-machine/blob/33777ed924ef5a8349c8207f2250a0af9aa12beb/lib/git-revision-view.coffee
10
59
littlebee/git-time-machine:lib/git-revision-view.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var GitRevisionView; GitRevisionView = (function() { class GitRevisionView { /* This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes ...
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
33777ed924ef5a8349c8207f2250a0af9aa12beb
1,111
https://github.com/littlebee/git-time-machine/blob/33777ed924ef5a8349c8207f2250a0af9aa12beb/lib/git-revision-view.coffee
10
59
littlebee/git-time-machine:lib/git-revision-view.coffee:2:completion
completion
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
fileContents = "" stdout = (output) => fileContents += output exit = (code) => if code is 0 @_showRevision(file, editor, revHash, fileContents, options) else atom.notifications.addError "Could not retrieve revision for #{path.basename(file)} (#{code})" @_loadRevision fil...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
33777ed924ef5a8349c8207f2250a0af9aa12beb
1,111
https://github.com/littlebee/git-time-machine/blob/33777ed924ef5a8349c8207f2250a0af9aa12beb/lib/git-revision-view.coffee
10
59
littlebee/git-time-machine:lib/git-revision-view.coffee:3:raw_corpus
raw_corpus
@_showRevision: (file, editor, revHash, fileContents, options={}) -> outputDir = "#{atom.getConfigDirPath()}/git-time-machine" fs.mkdir outputDir if not fs.existsSync outputDir outputFilePath = "#{outputDir}/#{@FILE_PREFIX}#{path.basename(file)}" outputFilePath += ".diff" if options.diff tempContent...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
33777ed924ef5a8349c8207f2250a0af9aa12beb
1,111
https://github.com/littlebee/git-time-machine/blob/33777ed924ef5a8349c8207f2250a0af9aa12beb/lib/git-revision-view.coffee
60
109
littlebee/git-time-machine:lib/git-revision-view.coffee:3:completion
completion
@_showRevision: (file, editor, revHash, fileContents, options={}) -> outputDir = "#{atom.getConfigDirPath()}/git-time-machine" fs.mkdir outputDir if not fs.existsSync outputDir outputFilePath = "#{outputDir}/#{@FILE_PREFIX}#{path.basename(file)}" outputFilePath += ".diff" if options.diff tempContent...
@_updateNewTextEditor: (newTextEditor, editor, revHash, fileContents) -> # slight delay so the user gets feedback on their action _.delay => lineEnding = editor.buffer?.lineEndingForRow(0) || "\n" fileContents = fileContents.replace(/(\r\n|\n)/g, lineEnding) newTextEditor.buffer.setPreferredLi...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
33777ed924ef5a8349c8207f2250a0af9aa12beb
1,111
https://github.com/littlebee/git-time-machine/blob/33777ed924ef5a8349c8207f2250a0af9aa12beb/lib/git-revision-view.coffee
60
109
littlebee/git-time-machine:lib/git-revision-view.coffee:4:raw_corpus
raw_corpus
if titleText.indexOf('@') >= 0 titleText = titleText.replace(/\@.*/, "@#{revHash}") else titleText += " @#{revHash}" $tabTitle.text(titleText)
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
33777ed924ef5a8349c8207f2250a0af9aa12beb
1,111
https://github.com/littlebee/git-time-machine/blob/33777ed924ef5a8349c8207f2250a0af9aa12beb/lib/git-revision-view.coffee
110
115
littlebee/git-time-machine:lib/git-revision-view.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if titleText.indexOf('@') >= 0 titleText = titleText.replace(/\@.*/, "@#{revHash}") else titleText += " @#{revHash}" $tabTitle.text(titleText) ```
var titleText; if (titleText.indexOf('@') >= 0) { titleText = titleText.replace(/\@.*/, `@${revHash}`); } else { titleText += ` @${revHash}`; } $tabTitle.text(titleText);
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
33777ed924ef5a8349c8207f2250a0af9aa12beb
1,111
https://github.com/littlebee/git-time-machine/blob/33777ed924ef5a8349c8207f2250a0af9aa12beb/lib/git-revision-view.coffee
110
115
littlebee/git-time-machine:lib/git-revision-view.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var titleText; if (titleText.indexOf('@') >= 0) { titleText = titleText.replace(/\@.*/, `@${revHash}`); } else { titleText += ` @${revHash}`; } $tabTitle.text(titleText); ```
if titleText.indexOf('@') >= 0 titleText = titleText.replace(/\@.*/, "@#{revHash}") else titleText += " @#{revHash}" $tabTitle.text(titleText)
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
33777ed924ef5a8349c8207f2250a0af9aa12beb
1,111
https://github.com/littlebee/git-time-machine/blob/33777ed924ef5a8349c8207f2250a0af9aa12beb/lib/git-revision-view.coffee
110
115
littlebee/git-time-machine:lib/git-revision-view.coffee:4:completion
completion
if titleText.indexOf('@') >= 0 titleText = titleText.replace(/\@.*/, "@#{revHash}") else
titleText += " @#{revHash}" $tabTitle.text(titleText)
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
33777ed924ef5a8349c8207f2250a0af9aa12beb
1,111
https://github.com/littlebee/git-time-machine/blob/33777ed924ef5a8349c8207f2250a0af9aa12beb/lib/git-revision-view.coffee
110
115
littlebee/git-time-machine:lib/git-revision-view.coffee:3:raw_corpus
raw_corpus
@_getInitialLineNumber: (editor) -> editorEle = atom.views.getView editor lineNumber = 0 if editor? && editor != '' lineNumber = editorEle.getLastVisibleScreenRow() # console.log "_getInitialLineNumber", lineNumber # TODO: why -5? this is what it took to actually sync the last line numbe...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
3945381dfe5b47b2ff3da6c1519cc9d1df5c23ad
1,111
https://github.com/littlebee/git-time-machine/blob/3945381dfe5b47b2ff3da6c1519cc9d1df5c23ad/lib/git-revision-view.coffee
60
109
littlebee/git-time-machine:lib/git-revision-view.coffee:3:completion
completion
@_getInitialLineNumber: (editor) -> editorEle = atom.views.getView editor lineNumber = 0 if editor? && editor != '' lineNumber = editorEle.getLastVisibleScreenRow() # console.log "_getInitialLineNumber", lineNumber # TODO: why -5? this is what it took to actually sync the last line numbe...
activatePane: false activateItem: true searchAllPanes: false promise.then (editor) => promise = atom.workspace.open outputFilePath, split: "right" activatePane: false activateItem: true searchAllPanes: false promise.then (ne...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
3945381dfe5b47b2ff3da6c1519cc9d1df5c23ad
1,111
https://github.com/littlebee/git-time-machine/blob/3945381dfe5b47b2ff3da6c1519cc9d1df5c23ad/lib/git-revision-view.coffee
60
109
littlebee/git-time-machine:lib/git-revision-view.coffee:4:raw_corpus
raw_corpus
@SplitDiffService?.diffEditors(editor, newTextEditor) @_affixTabTitle newTextEditor, revHash , 300 @_affixTabTitle: (newTextEditor, revHash) -> # speaking of hacks this is also hackish, there has to be a better way to change to # tab title and unlinking it from the file name $el = $(atom.views...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
3945381dfe5b47b2ff3da6c1519cc9d1df5c23ad
1,111
https://github.com/littlebee/git-time-machine/blob/3945381dfe5b47b2ff3da6c1519cc9d1df5c23ad/lib/git-revision-view.coffee
110
127
littlebee/git-time-machine:lib/git-revision-view.coffee:4:completion
completion
@SplitDiffService?.diffEditors(editor, newTextEditor) @_affixTabTitle newTextEditor, revHash , 300 @_affixTabTitle: (newTextEditor, revHash) -> # speaking of hacks this is also hackish, there has to be a better way to change to # tab title and unlinking it from the file name
$el = $(atom.views.getView(newTextEditor)) $tabTitle = $el.parents('atom-pane').find('li.tab.active .title') titleText = $tabTitle.text() if titleText.indexOf('@') >= 0 titleText = titleText.replace(/\@.*/, "@#{revHash}") else titleText += " @#{revHash}" $tabTitle.text(titleText)
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
3945381dfe5b47b2ff3da6c1519cc9d1df5c23ad
1,111
https://github.com/littlebee/git-time-machine/blob/3945381dfe5b47b2ff3da6c1519cc9d1df5c23ad/lib/git-revision-view.coffee
110
127
littlebee/git-time-machine:lib/git-revision-view.coffee:2:raw_corpus
raw_corpus
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
27d0652e6989cfef4efab37c3080663c81b94f66
1,111
https://github.com/littlebee/git-time-machine/blob/27d0652e6989cfef4efab37c3080663c81b94f66/lib/git-revision-view.coffee
12
61
littlebee/git-time-machine:lib/git-revision-view.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in ...
var GitRevisionView; GitRevisionView = (function() { class GitRevisionView { /* This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in ...
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
27d0652e6989cfef4efab37c3080663c81b94f66
1,111
https://github.com/littlebee/git-time-machine/blob/27d0652e6989cfef4efab37c3080663c81b94f66/lib/git-revision-view.coffee
12
61
littlebee/git-time-machine:lib/git-revision-view.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var GitRevisionView; GitRevisionView = (function() { class GitRevisionView { /* This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes ...
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
27d0652e6989cfef4efab37c3080663c81b94f66
1,111
https://github.com/littlebee/git-time-machine/blob/27d0652e6989cfef4efab37c3080663c81b94f66/lib/git-revision-view.coffee
12
61
littlebee/git-time-machine:lib/git-revision-view.coffee:2:completion
completion
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
fileContents = "" stdout = (output) => fileContents += output exit = (code) => if code is 0 @_showRevision(file, editor, revHash, fileContents, options) else atom.notifications.addError "Could not retrieve revision for #{path.basename(file)} (#{code})" @_loadRevision fil...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
27d0652e6989cfef4efab37c3080663c81b94f66
1,111
https://github.com/littlebee/git-time-machine/blob/27d0652e6989cfef4efab37c3080663c81b94f66/lib/git-revision-view.coffee
12
61
littlebee/git-time-machine:lib/git-revision-view.coffee:3:raw_corpus
raw_corpus
@_getInitialLineNumber: (editor) -> editorEle = atom.views.getView editor lineNumber = 0 if editor? && editor != '' lineNumber = editorEle.getLastVisibleScreenRow() # console.log "_getInitialLineNumber", lineNumber # TODO: why -5? this is what it took to actually sync the last line numbe...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
27d0652e6989cfef4efab37c3080663c81b94f66
1,111
https://github.com/littlebee/git-time-machine/blob/27d0652e6989cfef4efab37c3080663c81b94f66/lib/git-revision-view.coffee
62
111
littlebee/git-time-machine:lib/git-revision-view.coffee:3:completion
completion
@_getInitialLineNumber: (editor) -> editorEle = atom.views.getView editor lineNumber = 0 if editor? && editor != '' lineNumber = editorEle.getLastVisibleScreenRow() # console.log "_getInitialLineNumber", lineNumber # TODO: why -5? this is what it took to actually sync the last line numbe...
activatePane: false activateItem: true searchAllPanes: false promise.then (editor) => promise = atom.workspace.open outputFilePath, split: "right" activatePane: false activateItem: true searchAllPanes: false promise.then (ne...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
27d0652e6989cfef4efab37c3080663c81b94f66
1,111
https://github.com/littlebee/git-time-machine/blob/27d0652e6989cfef4efab37c3080663c81b94f66/lib/git-revision-view.coffee
62
111
littlebee/git-time-machine:lib/git-revision-view.coffee:4:raw_corpus
raw_corpus
# "would you like to save" message between changes to rev being viewed newTextEditor.buffer.cachedDiskContents = fileContents @_splitDiff(editor, newTextEditor) @_syncScroll(editor, newTextEditor) @_affixTabTitle newTextEditor, revHash , 300 @_affixTabTitle: (newTextEditor, revHash) ->...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
27d0652e6989cfef4efab37c3080663c81b94f66
1,111
https://github.com/littlebee/git-time-machine/blob/27d0652e6989cfef4efab37c3080663c81b94f66/lib/git-revision-view.coffee
112
161
littlebee/git-time-machine:lib/git-revision-view.coffee:4:completion
completion
# "would you like to save" message between changes to rev being viewed newTextEditor.buffer.cachedDiskContents = fileContents @_splitDiff(editor, newTextEditor) @_syncScroll(editor, newTextEditor) @_affixTabTitle newTextEditor, revHash , 300 @_affixTabTitle: (newTextEditor, revHash) ->...
editors = editor1: newTextEditor # the older revision editor2: editor # current rev if not SplitDiff._getConfig 'rightEditorColor' then SplitDiff._setConfig 'rightEditorColor', 'green' if not SplitDiff._getConfig 'leftEditorColor' then SplitDiff._setConfig 'leftEditorColor', 'red' ...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
27d0652e6989cfef4efab37c3080663c81b94f66
1,111
https://github.com/littlebee/git-time-machine/blob/27d0652e6989cfef4efab37c3080663c81b94f66/lib/git-revision-view.coffee
112
161
littlebee/git-time-machine:lib/git-revision-view.coffee:5:raw_corpus
raw_corpus
# sync scroll to editor that we are show revision for @_syncScroll: (editor, newTextEditor) -> # without the delay, the scroll position will fluctuate slightly beween # calls to editor setText _.delay => return if newTextEditor.isDestroyed() newTextEditor.scrollToBufferPosition({row: @_getInit...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
27d0652e6989cfef4efab37c3080663c81b94f66
1,111
https://github.com/littlebee/git-time-machine/blob/27d0652e6989cfef4efab37c3080663c81b94f66/lib/git-revision-view.coffee
162
169
littlebee/git-time-machine:lib/git-revision-view.coffee:5:completion
completion
# sync scroll to editor that we are show revision for @_syncScroll: (editor, newTextEditor) -> # without the delay, the scroll position will fluctuate slightly beween # calls to editor setText
_.delay => return if newTextEditor.isDestroyed() newTextEditor.scrollToBufferPosition({row: @_getInitialLineNumber(editor), column: 0}) , 50
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
27d0652e6989cfef4efab37c3080663c81b94f66
1,111
https://github.com/littlebee/git-time-machine/blob/27d0652e6989cfef4efab37c3080663c81b94f66/lib/git-revision-view.coffee
162
169
littlebee/git-time-machine:lib/git-revision-view.coffee:4:raw_corpus
raw_corpus
# "would you like to save" message between changes to rev being viewed newTextEditor.buffer.cachedDiskContents = fileContents @_splitDiff(editor, newTextEditor) @_syncScroll(editor, newTextEditor) @_affixTabTitle newTextEditor, revHash , 300 @_affixTabTitle: (newTextEditor, revHash) ->...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
7297db4174168939154f6a375165663e4961741c
1,111
https://github.com/littlebee/git-time-machine/blob/7297db4174168939154f6a375165663e4961741c/lib/git-revision-view.coffee
112
161
littlebee/git-time-machine:lib/git-revision-view.coffee:4:completion
completion
# "would you like to save" message between changes to rev being viewed newTextEditor.buffer.cachedDiskContents = fileContents @_splitDiff(editor, newTextEditor) @_syncScroll(editor, newTextEditor) @_affixTabTitle newTextEditor, revHash , 300 @_affixTabTitle: (newTextEditor, revHash) ->...
editors = editor1: newTextEditor # the older revision editor2: editor # current rev SplitDiff._setConfig 'rightEditorColor', 'green' SplitDiff._setConfig 'leftEditorColor', 'red' SplitDiff._setConfig 'diffWords', true SplitDiff._setConfig 'ignoreWhitespace', true SplitDiff....
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
7297db4174168939154f6a375165663e4961741c
1,111
https://github.com/littlebee/git-time-machine/blob/7297db4174168939154f6a375165663e4961741c/lib/git-revision-view.coffee
112
161
littlebee/git-time-machine:lib/git-revision-view.coffee:4:raw_corpus
raw_corpus
# "would you like to save" message between changes to rev being viewed newTextEditor.buffer.cachedDiskContents = fileContents @_splitDiff(editor, newTextEditor) @_syncScroll(editor, newTextEditor) @_affixTabTitle newTextEditor, revHash , 300 @_affixTabTitle: (newTextEditor, revHash) ->...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
872c5fe799658c4dbdf6c7154984c4efcdbb4dc9
1,111
https://github.com/littlebee/git-time-machine/blob/872c5fe799658c4dbdf6c7154984c4efcdbb4dc9/lib/git-revision-view.coffee
112
161
littlebee/git-time-machine:lib/git-revision-view.coffee:4:completion
completion
# "would you like to save" message between changes to rev being viewed newTextEditor.buffer.cachedDiskContents = fileContents @_splitDiff(editor, newTextEditor) @_syncScroll(editor, newTextEditor) @_affixTabTitle newTextEditor, revHash , 300 @_affixTabTitle: (newTextEditor, revHash) ->...
editors = editor1: newTextEditor # the older revision editor2: editor # current rev SplitDiff._setConfig 'rightEditorColor', 'green' SplitDiff._setConfig 'leftEditorColor', 'red' SplitDiff._setConfig 'diffWords', true SplitDiff._setConfig 'ignoreWhitespace', true SplitDiff....
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
872c5fe799658c4dbdf6c7154984c4efcdbb4dc9
1,111
https://github.com/littlebee/git-time-machine/blob/872c5fe799658c4dbdf6c7154984c4efcdbb4dc9/lib/git-revision-view.coffee
112
161
littlebee/git-time-machine:lib/git-revision-view.coffee:2:raw_corpus
raw_corpus
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
f13cb57977b603e055344770bbf572fd9a1bedef
1,111
https://github.com/littlebee/git-time-machine/blob/f13cb57977b603e055344770bbf572fd9a1bedef/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:2:completion
completion
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
stdout = (output) => fileContents += output exit = (code) => if code is 0 @_showRevision(file, editor, leftRevHash, fileContents, options) else atom.notifications.addError "Could not retrieve revision for #{path.basename(file)} (#{code})" @_loadRevision file, leftRevHash, st...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
f13cb57977b603e055344770bbf572fd9a1bedef
1,111
https://github.com/littlebee/git-time-machine/blob/f13cb57977b603e055344770bbf572fd9a1bedef/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:3:raw_corpus
raw_corpus
"#{hash}:./#{path.basename(file)}" ] # console.log "calling git" new BufferedProcess { command: "git", args: showArgs, options: { cwd:path.dirname(file) }, stdout, exit } @_getInitialLineNumber: (editor) -> editorEle = atom.views.getView editor lineNumber = 0 ...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
f13cb57977b603e055344770bbf572fd9a1bedef
1,111
https://github.com/littlebee/git-time-machine/blob/f13cb57977b603e055344770bbf572fd9a1bedef/lib/git-revision-view.coffee
64
113
littlebee/git-time-machine:lib/git-revision-view.coffee:3:completion
completion
"#{hash}:./#{path.basename(file)}" ] # console.log "calling git" new BufferedProcess { command: "git", args: showArgs, options: { cwd:path.dirname(file) }, stdout, exit } @_getInitialLineNumber: (editor) -> editorEle = atom.views.getView editor lineNumber = 0 ...
outputDir = "#{atom.getConfigDirPath()}/git-time-machine" fs.mkdir outputDir if not fs.existsSync outputDir outputFilePath = "#{outputDir}/#{@FILE_PREFIX}#{path.basename(file)}" outputFilePath += ".diff" if options.diff tempContent = "Loading..." + editor.buffer?.lineEndingForRow(0) fs.writeFile o...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
f13cb57977b603e055344770bbf572fd9a1bedef
1,111
https://github.com/littlebee/git-time-machine/blob/f13cb57977b603e055344770bbf572fd9a1bedef/lib/git-revision-view.coffee
64
113
littlebee/git-time-machine:lib/git-revision-view.coffee:4:raw_corpus
raw_corpus
activateItem: true searchAllPanes: false promise.then (newTextEditor) => @_updateEditors(newTextEditor, editor, revHash, fileContents) pane.activate() @isActivating = false @_updateEditors: (newTextEditor, editor, revHash, fileContents) -> lineEnding ...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
f13cb57977b603e055344770bbf572fd9a1bedef
1,111
https://github.com/littlebee/git-time-machine/blob/f13cb57977b603e055344770bbf572fd9a1bedef/lib/git-revision-view.coffee
114
163
littlebee/git-time-machine:lib/git-revision-view.coffee:4:completion
completion
activateItem: true searchAllPanes: false promise.then (newTextEditor) => @_updateEditors(newTextEditor, editor, revHash, fileContents) pane.activate() @isActivating = false @_updateEditors: (newTextEditor, editor, revHash, fileContents) -> lineEnding ...
# HACK ALERT: this is prone to eventually fail. Don't show user change # "would you like to save" message between changes to rev being viewed newTextEditor.buffer.cachedDiskContents = fileContents @splitDiff(editor, newTextEditor) @syncScroll(editor, newTextEditor) @_affixTabTitle newTextEditor, r...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
f13cb57977b603e055344770bbf572fd9a1bedef
1,111
https://github.com/littlebee/git-time-machine/blob/f13cb57977b603e055344770bbf572fd9a1bedef/lib/git-revision-view.coffee
114
163
littlebee/git-time-machine:lib/git-revision-view.coffee:5:raw_corpus
raw_corpus
editors = editor1: newTextEditor # the older revision editor2: editor # current rev SplitDiff._setConfig 'rightEditorColor', 'green' SplitDiff._setConfig 'leftEditorColor', 'red' SplitDiff._setConfig 'diffWords', true SplitDiff._setConfig 'ignoreWhitespace', true SplitDiff....
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
f13cb57977b603e055344770bbf572fd9a1bedef
1,111
https://github.com/littlebee/git-time-machine/blob/f13cb57977b603e055344770bbf572fd9a1bedef/lib/git-revision-view.coffee
164
196
littlebee/git-time-machine:lib/git-revision-view.coffee:5:completion
completion
editors = editor1: newTextEditor # the older revision editor2: editor # current rev SplitDiff._setConfig 'rightEditorColor', 'green' SplitDiff._setConfig 'leftEditorColor', 'red' SplitDiff._setConfig 'diffWords', true SplitDiff._setConfig 'ignoreWhitespace', true SplitDiff....
editors = null; SplitDiff.disable(false) SplitDiff.editorSubscriptions.add editors.editor2.onDidDestroy => editors = null; SplitDiff.disable(false) SplitDiff.updateDiff editors # sync scroll to editor that we are show revision for @syncScroll: (editor, newTextEditor) -> # without th...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
f13cb57977b603e055344770bbf572fd9a1bedef
1,111
https://github.com/littlebee/git-time-machine/blob/f13cb57977b603e055344770bbf572fd9a1bedef/lib/git-revision-view.coffee
164
196
littlebee/git-time-machine:lib/git-revision-view.coffee:2:raw_corpus
raw_corpus
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
b1281e798dab23ff821fd5846246180b5eb51ce2
1,111
https://github.com/littlebee/git-time-machine/blob/b1281e798dab23ff821fd5846246180b5eb51ce2/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:2:completion
completion
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
stdout = (output) => fileContents += output exit = (code) => if code is 0 @_showRevision(file, editor, revHash, fileContents, options) else atom.notifications.addError "Could not retrieve revision for #{path.basename(file)} (#{code})" @_loadRevision file, revHash, stdout, ex...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
b1281e798dab23ff821fd5846246180b5eb51ce2
1,111
https://github.com/littlebee/git-time-machine/blob/b1281e798dab23ff821fd5846246180b5eb51ce2/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:2:raw_corpus
raw_corpus
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0
1,111
https://github.com/littlebee/git-time-machine/blob/badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in ...
var GitRevisionView; GitRevisionView = (function() { class GitRevisionView { /* This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in ...
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0
1,111
https://github.com/littlebee/git-time-machine/blob/badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var GitRevisionView; GitRevisionView = (function() { class GitRevisionView { /* This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes ...
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0
1,111
https://github.com/littlebee/git-time-machine/blob/badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:2:completion
completion
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
stdout = (output) => fileContents += output exit = (code) => if code is 0 @_showRevision(file, editor, revHash, fileContents, options) else atom.notifications.addError "Could not retrieve revision for #{path.basename(file)} (#{code})" @_loadRevision file, revHash, stdout, ex...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0
1,111
https://github.com/littlebee/git-time-machine/blob/badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:3:raw_corpus
raw_corpus
# console.log "calling git" new BufferedProcess { command: "git", args: showArgs, options: { cwd:path.dirname(file) }, stdout, exit } @_getInitialLineNumber: (editor) -> editorEle = atom.views.getView editor lineNumber = 0 if editor? && editor != '' lineNumber...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0
1,111
https://github.com/littlebee/git-time-machine/blob/badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0/lib/git-revision-view.coffee
64
113
littlebee/git-time-machine:lib/git-revision-view.coffee:3:completion
completion
# console.log "calling git" new BufferedProcess { command: "git", args: showArgs, options: { cwd:path.dirname(file) }, stdout, exit } @_getInitialLineNumber: (editor) -> editorEle = atom.views.getView editor lineNumber = 0 if editor? && editor != '' lineNumber...
outputFilePath = "#{outputDir}/#{@FILE_PREFIX}#{path.basename(file)}" outputFilePath += ".diff" if options.diff tempContent = "Loading..." + editor.buffer?.lineEndingForRow(0) fs.writeFile outputFilePath, tempContent, (error) => if not error # editor (current rev) may have been destroyed, wo...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0
1,111
https://github.com/littlebee/git-time-machine/blob/badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0/lib/git-revision-view.coffee
64
113
littlebee/git-time-machine:lib/git-revision-view.coffee:4:raw_corpus
raw_corpus
@_updateEditors(newTextEditor, editor, revHash, fileContents) pane.activate() @_updateEditors: (newTextEditor, editor, revHash, fileContents) -> lineEnding = editor.buffer?.lineEndingForRow(0) || "\n" fileContents = fileContents.replace(/(\r\n|\n)/g, lineEnding) newTextEditor.buffer.setPr...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0
1,111
https://github.com/littlebee/git-time-machine/blob/badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0/lib/git-revision-view.coffee
114
163
littlebee/git-time-machine:lib/git-revision-view.coffee:4:completion
completion
@_updateEditors(newTextEditor, editor, revHash, fileContents) pane.activate() @_updateEditors: (newTextEditor, editor, revHash, fileContents) -> lineEnding = editor.buffer?.lineEndingForRow(0) || "\n" fileContents = fileContents.replace(/(\r\n|\n)/g, lineEnding) newTextEditor.buffer.setPr...
@splitDiff(editor, newTextEditor) @syncScroll(editor, newTextEditor) @_affixTabTitle newTextEditor, revHash @_affixTabTitle: (newTextEditor, revHash) -> # speaking of hacks this is also hackish, there has to be a better way to change to # tab title and unlinking it from the file name $el = $(at...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0
1,111
https://github.com/littlebee/git-time-machine/blob/badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0/lib/git-revision-view.coffee
114
163
littlebee/git-time-machine:lib/git-revision-view.coffee:5:raw_corpus
raw_corpus
SplitDiff._setConfig 'rightEditorColor', 'green' SplitDiff._setConfig 'leftEditorColor', 'red' SplitDiff._setConfig 'diffWords', true SplitDiff._setConfig 'ignoreWhitespace', true SplitDiff._setConfig 'syncHorizontalScroll', true SplitDiff.editorSubscriptions = new CompositeDisposable() SplitDi...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0
1,111
https://github.com/littlebee/git-time-machine/blob/badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0/lib/git-revision-view.coffee
164
192
littlebee/git-time-machine:lib/git-revision-view.coffee:5:completion
completion
SplitDiff._setConfig 'rightEditorColor', 'green' SplitDiff._setConfig 'leftEditorColor', 'red' SplitDiff._setConfig 'diffWords', true SplitDiff._setConfig 'ignoreWhitespace', true SplitDiff._setConfig 'syncHorizontalScroll', true SplitDiff.editorSubscriptions = new CompositeDisposable() SplitDi...
SplitDiff.editorSubscriptions.add editors.editor2.onDidDestroy => editors = null; SplitDiff.disable(false) SplitDiff.updateDiff editors # sync scroll to editor that we are show revision for @syncScroll: (editor, newTextEditor) -> # without the delay, the scroll position will fluctuate slightl...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0
1,111
https://github.com/littlebee/git-time-machine/blob/badfd2cd7ac47c693c9aaac12df6a2be5d2d2ec0/lib/git-revision-view.coffee
164
192
littlebee/git-time-machine:lib/git-revision-view.coffee:2:raw_corpus
raw_corpus
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
e89e6fd9f76d566d583c4163f4ed58a56da74f71
1,111
https://github.com/littlebee/git-time-machine/blob/e89e6fd9f76d566d583c4163f4ed58a56da74f71/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in ...
var GitRevisionView; GitRevisionView = (function() { class GitRevisionView { /* This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in ...
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
e89e6fd9f76d566d583c4163f4ed58a56da74f71
1,111
https://github.com/littlebee/git-time-machine/blob/e89e6fd9f76d566d583c4163f4ed58a56da74f71/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var GitRevisionView; GitRevisionView = (function() { class GitRevisionView { /* This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes ...
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
e89e6fd9f76d566d583c4163f4ed58a56da74f71
1,111
https://github.com/littlebee/git-time-machine/blob/e89e6fd9f76d566d583c4163f4ed58a56da74f71/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:2:completion
completion
class GitRevisionView @FILE_PREFIX = "TimeMachine - " ### This code and technique was originally from git-history package, see https://github.com/jakesankey/git-history/blob/master/lib/git-history-view.coffee Changes to permit click and drag in the time plot to travel in time: - don't write revisi...
fileContents += output exit = (code) => if code is 0 @_showRevision(file, editor, revHash, fileContents, options) else atom.notifications.addError "Could not retrieve revision for #{path.basename(file)} (#{code})" @_loadRevision file, revHash, stdout, exit # returns the pane and...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
e89e6fd9f76d566d583c4163f4ed58a56da74f71
1,111
https://github.com/littlebee/git-time-machine/blob/e89e6fd9f76d566d583c4163f4ed58a56da74f71/lib/git-revision-view.coffee
14
63
littlebee/git-time-machine:lib/git-revision-view.coffee:3:raw_corpus
raw_corpus
@_loadRevision: (file, hash, stdout, exit) -> showArgs = [ "show", "#{hash}:./#{path.basename(file)}" ] # console.log "calling git" new BufferedProcess { command: "git", args: showArgs, options: { cwd:path.dirname(file) }, stdout, exit } @_getInitialLine...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
e89e6fd9f76d566d583c4163f4ed58a56da74f71
1,111
https://github.com/littlebee/git-time-machine/blob/e89e6fd9f76d566d583c4163f4ed58a56da74f71/lib/git-revision-view.coffee
64
113
littlebee/git-time-machine:lib/git-revision-view.coffee:3:completion
completion
@_loadRevision: (file, hash, stdout, exit) -> showArgs = [ "show", "#{hash}:./#{path.basename(file)}" ] # console.log "calling git" new BufferedProcess { command: "git", args: showArgs, options: { cwd:path.dirname(file) }, stdout, exit } @_getInitialLine...
return lineNumber - 5 @_showRevision: (file, editor, revHash, fileContents, options={}) -> outputDir = "#{atom.getConfigDirPath()}/git-time-machine" fs.mkdir outputDir if not fs.existsSync outputDir outputFilePath = "#{outputDir}/#{@FILE_PREFIX}#{path.basename(file)}" outputFilePath += ".diff" if op...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
e89e6fd9f76d566d583c4163f4ed58a56da74f71
1,111
https://github.com/littlebee/git-time-machine/blob/e89e6fd9f76d566d583c4163f4ed58a56da74f71/lib/git-revision-view.coffee
64
113
littlebee/git-time-machine:lib/git-revision-view.coffee:4:raw_corpus
raw_corpus
atom.workspace.activatePreviousPane() promise = atom.workspace.open outputFilePath, activateItem: true searchAllPanes: false promise.then (newTextEditor) => @_updateNewTextEditor(newTextEditor, editor, revHash, fileContents) pane.activate() @_u...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
e89e6fd9f76d566d583c4163f4ed58a56da74f71
1,111
https://github.com/littlebee/git-time-machine/blob/e89e6fd9f76d566d583c4163f4ed58a56da74f71/lib/git-revision-view.coffee
114
163
littlebee/git-time-machine:lib/git-revision-view.coffee:4:completion
completion
atom.workspace.activatePreviousPane() promise = atom.workspace.open outputFilePath, activateItem: true searchAllPanes: false promise.then (newTextEditor) => @_updateNewTextEditor(newTextEditor, editor, revHash, fileContents) pane.activate() @_u...
@_affixTabTitle newTextEditor, revHash @_affixTabTitle: (newTextEditor, revHash) -> # speaking of hacks this is also hackish, there has to be a better way to change to # tab title and unlinking it from the file name $el = $(atom.views.getView(newTextEditor)) $tabTitle = $el.parents('atom-pane').fin...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
e89e6fd9f76d566d583c4163f4ed58a56da74f71
1,111
https://github.com/littlebee/git-time-machine/blob/e89e6fd9f76d566d583c4163f4ed58a56da74f71/lib/git-revision-view.coffee
114
163
littlebee/git-time-machine:lib/git-revision-view.coffee:5:raw_corpus
raw_corpus
SplitDiff._setConfig 'diffWords', true SplitDiff._setConfig 'ignoreWhitespace', true SplitDiff._setConfig 'syncHorizontalScroll', true SplitDiff.editorSubscriptions = new CompositeDisposable() SplitDiff.editorSubscriptions.add editors.editor1.onDidStopChanging => SplitDiff.updateDiff(editors) if ...
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
e89e6fd9f76d566d583c4163f4ed58a56da74f71
1,111
https://github.com/littlebee/git-time-machine/blob/e89e6fd9f76d566d583c4163f4ed58a56da74f71/lib/git-revision-view.coffee
164
190
littlebee/git-time-machine:lib/git-revision-view.coffee:5:completion
completion
SplitDiff._setConfig 'diffWords', true SplitDiff._setConfig 'ignoreWhitespace', true SplitDiff._setConfig 'syncHorizontalScroll', true SplitDiff.editorSubscriptions = new CompositeDisposable() SplitDiff.editorSubscriptions.add editors.editor1.onDidStopChanging => SplitDiff.updateDiff(editors) if ...
editors = null; SplitDiff.disable(false) SplitDiff.updateDiff editors # sync scroll to editor that we are show revision for @syncScroll: (editor, newTextEditor) -> # without the delay, the scroll position will fluctuate slightly beween # calls to editor setText _.delay => return if ne...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/git-revision-view.coffee
MIT
e89e6fd9f76d566d583c4163f4ed58a56da74f71
1,111
https://github.com/littlebee/git-time-machine/blob/e89e6fd9f76d566d583c4163f4ed58a56da74f71/lib/git-revision-view.coffee
164
190