gdb:
Crtl + x, Crtl + 2 to cycle through windows
Crtl + x, Crtl + 1 to go back
Crtl + a to open tui mode
Crtl + l to repaint the curses screen.
| #!/bin/bash | |
| # Set FLAG_FILE to the project metadata file. | |
| # Ex: package.json, Gemfile, requirements.txt, etc. | |
| FLAG_FILE=${FLAG_FILE:-package.json} | |
| NOTFOUND_MESSAGE="Reached system root / and couldn't find package.json" | |
| goto_project_root() { | |
| if [ -f $FLAG_FILE ]; then | |
| # do something |
| """ | |
| Usage: | |
| $ pip install gunicorn | |
| $ gunicorn --workers 4 echo:app | |
| Notes: | |
| gunicorn spawns new processes for each worker, | |
| which means the count incrementer variable is | |
| unique for each worker. Use 1 worker to watch | |
| the count increment linearly. |
| new Promise((resolve, reject) => { | |
| if (ok) { | |
| resolve('Some success message'); | |
| } else { | |
| reject('Error message'); | |
| } | |
| }) | |
| .then(console.log) | |
| .catch(console.error); |
| [ | |
| { | |
| "year": 1753, | |
| "month": 1, | |
| "variance": -1.366 | |
| }, | |
| { | |
| "year": 1753, | |
| "month": 2, | |
| "variance": -2.223 |
| [ | |
| { | |
| "year": 1753, | |
| "month": 1, | |
| "variance": -1.366 | |
| }, | |
| { | |
| "year": 1753, | |
| "month": 2, | |
| "variance": -2.223 |
| import { Component } from 'react'; | |
| // CleanComponent wraps Component to provide a middleman | |
| // that passes only the specified PropTypes to the parent. | |
| // This makes it easier to just pass all props down to | |
| // children and not worry about overriding props. | |
| // E.x.: | |
| // | |
| // render() { | |
| // const { props } = this; |
| Promise.allKeys = function(table) { | |
| const keys = Object.keys(table); | |
| const promises = keys.map((k) => table[k]); | |
| return Promise.all(promises).then((array) => { | |
| return keys.reduce((results, k, i) => { | |
| results[k] = array[i]; | |
| return results; | |
| }, {}); | |
| }); |
| var imgs = document.getElementsByTagName('img'); for (let i = 0; i < imgs.length; i++) { console.log(imgs[i].getAttribute('src')); } |
gdb:
Crtl + x, Crtl + 2 to cycle through windows
Crtl + x, Crtl + 1 to go back
Crtl + a to open tui mode
Crtl + l to repaint the curses screen.
| --- | |
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: emojivoto | |
| --- | |
| apiVersion: apps/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: emoji-svc |