A prompt to boost your lazy "do this" prompts. Install with one of the buttons below.
| version: '3.7' | |
| services: | |
| dynamodb-local: | |
| image: amazon/dynamodb-local:latest | |
| container_name: dynamodb-local | |
| ports: | |
| - "8000:8000" | |
| dynamodb-admin: | |
| image: aaronshaf/dynamodb-admin |
| from nbgrader.api import Gradebook | |
| import petl as etl | |
| import psycopg2 | |
| from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT | |
| import sqlite3 | |
| db_name= 'nb_database' | |
| db_user= 'illumidesk' | |
| db_pwd= 'illumidesk.' | |
| db_host= 'illumidesk_db_instance' |
| // hints | |
| // ES6 rest params | |
| // arrow function | |
| const sum = (...args) => | |
| args.reduce((accu, value) => ({ | |
| positive: value > 0 ? accu.positive + value: accu.positive, | |
| negative: value < 0 ? accu.negative + value: accu.negative, | |
| }), { positive: 0, negative: 0}) | |
| // tests |
| const shapeArea = n => Math.pow( n, 2 ) + Math.pow( n - 1, 2 ); |
| // index.js | |
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import { createStore, combineReducers } from 'redux'; | |
| import { Provider } from 'react-redux'; | |
| import { reducer as formReducer } from 'redux-form'; | |
| import App from './App'; | |
| import registerServiceWorker from './registerServiceWorker'; |
| # How to delete a vmware file that was locked or corrupted | |
| 1. reboot mac | |
| 2 Cmd + R -> to recovery mode | |
| 3. From utilities, open the terminal | |
| 4. diskutil list -> to identity the main OS volume | |
| 5. diskutil unlockVolume <volumenIdentifier> | |
| 6. ls /Volumes to ensure our volume appear | |
| 7. goto to to /Macintosh HD/Users/<username>/Documents/Virtual Machines.localized/Windows 10 x64.vmwarevm | |
| 8. rm -fr <directoryOrfileWith.LckExtension> |
| description "Start the sos server as service" | |
| start on runlevel [2345] | |
| stop on runlevel [!2345] | |
| respawn | |
| setuid ubuntu | |
| # try 2 times every 10 seconds then stop it if the exec fail | |
| respawn limit 2 10 |
| [Test] | |
| public async Task ElasticClient_Test() | |
| { | |
| var people = new List<Person> | |
| { | |
| new Person { Id = 1 }, | |
| new Person { Id = 2 }, | |
| }; | |
| var hits = new List<IHit<Person>> |
| class User extends React.Component { | |
| // getChildContext serves as the initializer for our context values | |
| getChildContext() { | |
| return { | |
| favColor: '#f8c483', | |
| userName: 'James Ipsum' | |
| } | |
| } | |
| render() { |