This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.post( | |
'/heapdump-4E5AB3A6ECC24CD5B413A6D4DB5DB02FB4907018', | |
auth(config.server.authToken), | |
asyncHandler(async (req, res, next) => { | |
const { logger } = dependencies; | |
const hostname = os.hostname(); | |
const filepath = '/tmp/'; | |
const filename = `${Date.now()}.heapsnapshot`; | |
try { | |
heapdump.writeSnapshot(filepath + filename, err => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: Error applying plan: | |
4 error(s) occurred: | |
* newrelic_alert_policy_channel.app1: 1 error(s) occurred: | |
* newrelic_alert_policy_channel.app1: Internal Server Error | |
* newrelic_alert_policy_channel.app2: 1 error(s) occurred: | |
* newrelic_alert_policy_channel.app2: Internal Server Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export default React.createClass({ | |
displayName: 'Button', | |
propTypes: { | |
text: React.PropTypes.string.isRequired, | |
isDisabled: React.PropTypes.bool | |
}, | |
getDefaultProps() { | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── Stylus@1.1.0 | |
├── Zen@0.16.2 | |
├── advanced-new-file@0.4.3 | |
├── atom-beautify@0.28.11 | |
├── atom-jade@0.3.0 | |
├── atom-lint@0.20.1 | |
├── atom-rails@0.4.0 | |
├── atomatigit@1.5.4 | |
├── auto-indent@0.5.0 | |
├── auto-update-packages@1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Interpolate variable bindings | |
var name = "Bob", time = "today"; | |
`Hello ${name}, how are you ${time}?` | |
// Arrows | |
// e => {} | |
// function(e){} | |
// Expression bodies | |
var odds = evens.map(v => v + 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Bottles | |
def verse(num) | |
case num | |
when 0 | |
"No more bottles of beer on the wall, no more bottles of beer.\n" + | |
"Go to the store and buy some more, 99 bottles of beer on the wall.\n" | |
when 1 | |
"1 bottle of beer on the wall, 1 bottle of beer.\n" + | |
"Take it down and pass it around, no more bottles of beer on the wall.\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Bottles | |
# ... verse() & verses() methods not shown for brevity ... | |
def song | |
verses(99,0) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... previous setup and tests not shown for brevity ... | |
def test_the_whole_song | |
assert_equal bottles.verses(99, 0), bottles.song | |
end | |
# skipped tests not shown for brevity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... previous setup and tests not shown for brevity ... | |
def test_a_few_verses | |
expected = <<-VERSES | |
2 bottles of beer on the wall, 2 bottles of beer. | |
Take one down and pass it around, 1 bottle of beer on the wall. | |
1 bottle of beer on the wall, 1 bottle of beer. | |
Take it down and pass it around, no more bottles of beer on the wall. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ...setup and previous test not shown for brevity ... | |
def test_another_verse | |
expected = <<-VERSE | |
89 bottles of beer on the wall, 89 bottles of beer. | |
Take one down and pass it around, 88 bottles of beer on the wall. | |
VERSE | |
assert_equal expected, bottles.verse(89) | |
end | |
NewerOlder