This file contains hidden or 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
| Ensure regex button is selected and then type this in the search field. | |
| \s*console\.(log|warn|debug|info|count)\((?:[^("'`]+|(["'`])[^\1]*?\1|(\()[^\2]*\2)*?\);? |
This file contains hidden or 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
| var crypto = require('crypto'); | |
| exports.hashObject = function (object) { | |
| var hash = crypto.createHash('md5') | |
| .update(JSON.stringify(object, function (k, v) { | |
| if (k[0] === "_") return undefined; // remove api stuff | |
| else if (typeof v === "function") // consider functions | |
| return v.toString(); | |
| else return v; | |
| })) |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func abs(x float64) float64 { | |
| if x > 0 { | |
| return x | |
| } else { |
This file contains hidden or 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
| package main | |
| import "golang.org/x/tour/pic" | |
| import "math" | |
| func lemp(x1, y1, dx, dy, t float64) (tx, ty float64) { | |
| tx = x1 - t * dx | |
| ty = y1 - t * dy | |
| return | |
| } |
This file contains hidden or 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
| package main | |
| import "golang.org/x/tour/tree" | |
| import "fmt" | |
| // Walk walks the tree t sending all values | |
| // from the tree to the channel ch. | |
| func _walk(t *tree.Tree, ch chan int) { | |
| if t.Left != nil { _walk(t.Left, ch) } | |
| ch <- t.Value |
This file contains hidden or 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
| Clear() | |
| # Nominal GDP | |
| Say "2008 Nominal GDP: " + gdp08 = 1 * 115 + 2 * 175 | |
| Say "2009 Nominal GDP: " + gdp09 = 2 * 150 + 4 * 180 | |
| Say "2010 Nominal GDP: " + gdp10 = 4 * 120 + 4 * 190 | |
| # Real GDP | |
| Say "2008 Real GDP b08: " + gdp0808 = 1 * 115 + 2 * 175 | |
| Say "2009 Real GDP b08: " + gdp0908 = 1 * 150 + 2 * 180 | |
| Say "2010 Real GDP b08: " + gdp1008 = 1 * 120 + 2 * 190 |
This file contains hidden or 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
| /* Based on Isaac Muse's ExportHtml Color theme */ | |
| /* Based on Sublime Text's Monokai theme */ | |
| .cm-s-lawr.CodeMirror {background: white/*#272822*/; color: black/*#f8f8f2*/; font: 11pt "Consolas", "Courier", Monospace;} | |
| .cm-s-lawr div.CodeMirror-selected {background: dodgerblue/*#49483E*/ !important;} | |
| .cm-s-lawr span.CodeMirror-selectedtext {color: white !important;} | |
| .cm-s-lawr .CodeMirror-gutters {background: white/*#272822*/; border-right: 0px;} | |
| .cm-s-lawr .CodeMirror-linenumber {color: rgba(0,0,0,0.2)/*#d0d0d0*/;} | |
| .cm-s-lawr .CodeMirror-cursor {border-left: 1px solid black/*#f8f8f0*/ !important;} | |
| .cm-s-lawr .CodeMirror-cursor {border-right: 1px solid black/*#f8f8f0*/ !important;} |
This file contains hidden or 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
| /* Based on Isaac Muse's ExportHtml Color theme */ | |
| /* Based on Sublime Text's Monokai theme */ | |
| /* also based on http://www.colourlovers.com/palette/245002/Deutanopia-Safe_1 */ | |
| .cm-s-lawr .error-message {background: #f30; color: white;} | |
| .cm-s-lawr.CodeMirror {background: white/*#272822*/; color: black/*#f8f8f2*/; | |
| /*border-bottom: 5px solid rgba(0,0,0,0.2);*/ | |
| margin-bottom: 2em; | |
| } | |
| .cm-s-lawr .CodeMirror-lines {padding: 0;} |
This file contains hidden or 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
| # TOC | |
| # 1. Run Linting / Run Tests | |
| # 1.1 Upload Test Report | |
| # 1.2 Status Test Report | |
| # 1.3 Comment Linting | |
| # 2. Run Diff-cover | |
| # 2.1 Upload Diff-cover | |
| # 2.2 Comment Diff-cover | |
| # 3. Post Comments and Statuses to Github |
This file contains hidden or 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
| # DRONE_COMMIT commit sha | |
| # DRONE_BUILD_LINK | |
| # DRONE_REPO_OWNER repository owner | |
| # DRONE_REPO_NAME repository name | |
| # From github: | |
| # POST /repos/:owner/:repo/statuses/:sha | |
| export GITHUB_API=https://api.github.com | |
| export BODY=<< EOF | |
| { |