Install terminal-notifier
$ gem install terminal-notifier
Then add a new function into your .bashrc or .zshrc
function watch {
$* | { | |
| "responses.2xx": { | |
| "type": "counter", | |
| "value": 1 | |
| }, | |
| "responses.3xx": { | |
| "type": "counter", | |
| "value": 19 | |
| }, | |
| "responses.4xx": { |
| #!bin/bash | |
| MSG="$1" | |
| # Add JIRA hyperlinks to the end of the commmit message | |
| # Using ggrep (gnu grep) and | |
| add_JiraUrl() { | |
| # Get all the JIRA numbers from the commit heading e.g., [AIP-2024][APPS-2000] | |
| JIRA=$(cat $MSG | head -n 1 | ggrep -Po '(?<=\[)[A-Z]*[\-]\d*(?=\])') |
Install terminal-notifier
$ gem install terminal-notifier
Then add a new function into your .bashrc or .zshrc
function watch {
$* | set nocompatible " choose no compatibility with legacy vi | |
| set synmaxcol=120 " limit syntax highlighting to first 120 col | |
| set number " line numbers | |
| set colorcolumn=80 | |
| "" Set cursor lines in current window | |
| au WinLeave * set nocursorline nocursorcolumn | |
| au WinEnter * set cursorline cursorcolumn | |
| "" Recognize Markdown files |
I hereby claim:
To claim this, I am signing this object:
| def power_set(set) | |
| # Base Case: The power set of the empty set is a set with only the empty set [ [] ] | |
| return [set] if set.empty? | |
| # General Case: PS(set): PS(set - element) UNION [ element UNION for each subset in PS(set-element) ] | |
| ps = power_set(set[1..-1]) | |
| ps | ps.map { |subset| [set[0]] | subset } | |
| end |
| var Promise = require('bluebird'); | |
| var _ = require('lodash'); | |
| function promiseA() { | |
| return Promise.resolve([1]); | |
| } | |
| function promiseB(prevResult) { | |
| prevResult.push(2) | |
| return Promise.resolve(prevResult); |
| #!/usr/bin/env node | |
| var http = require('http'); | |
| var concat = require('concat-stream'); | |
| var address = 'rQE5Z3FgVnRMbVfS6xiVQFgB4J3X162FVD'; | |
| var url = 'http://localhost:5990/v1/accounts/' + address + '/orders?limit=10'; | |
| function getOrders(url, cb) { | |
| var req = http.get(url, function(res) { | |
| res.pipe(concat(function(body) { |
| #!/usr/bin/env node | |
| var oboe = require('oboe'); | |
| const address = 'rQE5Z3FgVnRMbVfS6xiVQFgB4J3X162FVD'; | |
| const baseUrl = 'http://localhost:5990/v1/accounts/' + address + '/orders?limit=10'; | |
| const stream = process.stdout; | |
| stream.write('[\n'); | |
| streamOrders(baseUrl,true) |
| a(); | |
| b(); | |
| var a = function() { | |
| console.log("hello world"); | |
| }; | |
| function b() { | |
| console.log("hello, again"); | |
| } |