Skip to content

Instantly share code, notes, and snippets.

@croraf
croraf / gist:ee7017bdda3e3c65881936173df2cbc9
Last active February 24, 2019 01:02
orderme app - backend interfaces description
orderme app backend interfaces with other parts of the app in the following ways:
1. KOA server
a) serves static resources
- single HTML template, which gets managed by React JS - single page application
- webpack-bundled JS which does everything that is done on frontend
- images
b) exposes REST API (endpoints)
REST API is defined by swagger, and can be explored on exposed swagger ui URL (https://order1.herokuapp.com/swagger).
@croraf
croraf / gist:6954b41966452a926400988e45b6543c
Last active February 24, 2019 01:02
orderme app - backend functionalities
Backend, once its interfaces (check https://gist.github.com/croraf/ee7017bdda3e3c65881936173df2cbc9) get initialized on startup (src/index.js file),
is message driven.
Meaning everything that happens is a consequence of receiving a REST message on REST endpoints.
(https://order1.herokuapp.com/swagger)
Therefore, several functionalities can be defined depending on the REST messages received.
As described in interfaces document, each of these messages get processed through 3 layers.
Checking the above swagger URL following functionalities can be seen:
1. CRUD on restaurants
ssh -vv ubuntu@ec2-18-217-230-111.us-east-2.compute.amazonaws.com
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "ec2-18-217-230-111.us-east-2.compute.amazonaws.com" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to ec2-18-217-230-111.us-east-2.compute.amazonaws.com [18.217.230.111] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/korisnik/.ssh/id_rsa type -1
{
"name": "dark-diagnosis-frontend",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/cli": {
"version": "7.5.0",
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.5.0.tgz",
"integrity": "sha512-qNH55fWbKrEsCwID+Qc/3JDPnsSGpIIiMDbppnR8Z6PxLAqMQCFNqBctkIkBrMH49Nx+qqVTrHRWUR+ho2k+qQ==",
{
"name": "dark-diagnosis-frontend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack-dev-server --mode=development",
"compile": "webpack --mode=production",
"installAndCompile": "npm install && npm run compile",
@croraf
croraf / CONTRIBUTING.md
Last active September 27, 2019 19:54
CONTRIBUTING.md for material-ui

Contributing

If you're reading this, you're awesome! Thank you for helping us make this project great and being a part of the Material-UI community. Here are a few guidelines that will help you along the way.

Git workflow

  1. Fork the Material-UI repository on GitHub

  2. Clone the fork to your local machine and add upstream remote

How to increase the chance of being accepted?

  • If props were added or prop types were changed, the TypeScript declarations were updated.
  • If TypeScript declarations were changed, yarn typescript passed.
  • If demos were changed, make sure yarn docs:typescript:formatted does not introduce changes. See About TypeScript demos.
<Table className={classes.table}>
<TableHead>
<TableRow>
<TableCell>Dessert (100g serving)</TableCell>
<TableCell align="right">Calories</TableCell>
<TableCell align="right">Fat&nbsp;(g)</TableCell>
<TableCell align="right">Carbs&nbsp;(g)</TableCell>
<TableCell align="right">Protein&nbsp;(g)</TableCell>
</TableRow>
</TableHead>
Features react-data-grid react-table material-table hand-sontable ag-gird antd Kendo Syncfusion datatables.net
Stars 3.5k 7k 1k 12k 6k
Downloads 280k 1.1m 90k 190k 400k 33k 5k 550k
Bundle size 40kB 11kB 85kB 315kB 250kB 20kB 425kB 56kB
Docs traffic 95k 230k 1.3m
Row sorting free free free 💰 free free 💰 💰 free
Filtering free free free 💰 free free 💰 💰 free
Cell editing free free free 💰 free free 💰 💰
Column with groups free 💰 free free 💰 💰 free
@croraf
croraf / C pattern
Created December 4, 2019 13:43
C OO pattern
```
struct MyClass;
MyClass* MyClassConstructor(int i);
void destroyMyClass(MyClass*);
void incrementMyClass(struct MyClass*);
```
```
#include "./MyClass.h"
static int main(){