strace -s 1024 -f <cmd>
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
| import subprocess | |
| # http://stackoverflow.com/questions/18774476/subprocess-call-logger-info-and-error-for-stdout-and-stderr-respectively | |
| # http://stackoverflow.com/questions/21953835/run-subprocess-and-print-output-to-logging | |
| def my_buddy_popen(): | |
| """ | |
| Since only stderr is bound, we only get a value for stderr. if this was a good call (exit 0) | |
| then out _would_ exist and sent to parent's and _not_ be in `out`. |
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 ( | |
| "os" | |
| ) | |
| func main() { | |
| w := os.Args[1] | |
| print(string(w[0])) | |
| print(len(w)) | |
| println(string(w[len(w) - 1])) |
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
| # Current version: 0.8.4 | |
| scp beehive:~jeremy/nimbula-ui/nimbula-ui-X.X.X.zip | |
| unzip nimbula-ui-X.X.X.zip | |
| cd nimbula-ui | |
| ./nimbula-ui-installer.py -ahttps://api.usdev290.nimbula -u/root/root | |
| # Visit https://10.33.19.10 ... replace with your IP |
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
| app = { | |
| DEBUG: true, | |
| VERSION: '1.0.0' | |
| }; | |
| app.logs = app.logs || { info: [], error: [], warn: [] }; | |
| app.logger = app.logger || { | |
| log: function () { | |
| var type = arguments[0], | |
| msg = arguments[1], |
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
| na.iconCreator = function (x, y, width, height, iconName, hoverTitle, sstr) { | |
| var p = this.properties, | |
| dim = this.wrapper.getBBox(), | |
| wx = _.isFunction(x) ? x(dim) : x, wy = _.isFunction(y) ? y(dim) : y, | |
| r = this.paper.rect(wx, wy, width, height), | |
| i = this.paper.path(na.icons[iconName]); | |
| set = this.paper.set(); | |
| tstr = (sstr || 'S0.05,0.05,0,0') + 'T' + wx + ',' + wy; | |
| // This is a hack to get all icons doing the same thing |
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
| /** | |
| * Move path method // hack for getting all svg icons | |
| * working the same way | |
| */ | |
| var movePath = function (x, y) { | |
| var path = Raphael.pathToRelative(this.attrs.path), | |
| dim = Raphael.pathBBox(this.attrs.path), | |
| dx = (path[0][1] - dim.x) + (x * 100), | |
| dy = (path[0][2] - dim.y) + (y * 100); | |
| path[0][1] = dx; |
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
| // More explicit example of | |
| // http://stackoverflow.com/questions/518000/is-javascript-a-pass-by-reference-or-pass-by-value-language | |
| // | |
| // When you change the `item` property of the object referenced by `obj1`, you are changing the value | |
| // of the `item` property that was originally set to 'unchanged'. When you assign `obj2` a value of | |
| // {item: 'changed'} you are changing the reference to a new object. This object immediately goes out | |
| // of scope when the function exits. | |
| function changeStuff(_num, _obj1, _obj2) { | |
| _num = _num * 10; |
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
| // We're providing some convenience functions here as well as making sure | |
| // chai tests don't fall on jshint errors by remapping true/false properties | |
| chai.Assertion.addProperty('_true', function () { | |
| this.assert( | |
| true === this.__flags.object, | |
| 'expected #{this} to be true', | |
| 'expected #{this} to be false', | |
| this.negate ? false : true | |
| ); | |
| }); |
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
| require 'octokit' | |
| require 'csv' | |
| require 'date' | |
| # Description: | |
| # Exports Github issues from one or more repos into CSV file formatted for import into JIRA | |
| # Note: By default, all Github comments will be assigned to the JIRA admin, appended with | |
| # a note indicating the Github user who added the comment (since you may not have JIRA users | |
| # created for all your Github users, especially if it is a public/open-source project: | |
| # |