Skip to content

Instantly share code, notes, and snippets.

View nikdo's full-sized avatar

Radek Matěj nikdo

View GitHub Profile
@nikdo
nikdo / README.md
Created January 23, 2021 17:12
Git hook to deploy React app on Linux

Git hook to deploy React app on Linux

What it does:

  1. Force checkouts pushed branch to /opt/<appname>.
  2. Installs dependencies.
  3. Builds React app.
  4. Copies build result into /var/www//html.

Managing rates, amenities and desk groups

Current status

James has to crate a new Resource Rate for every combination of amenities. Because we need the same rate names (Premium desk, Standard meeting room, etc.), she will end up with many indistinguishable rates. To limit the number of rates, sharing rates across multiple locations was suggested.

😱 This is unmaintainable. James won’t be able to keep the right amenities and rates assigned to the right resources. As a result, data will be corrupted, prices incorrect and users irritated.

Also by keeping rate name as desk group name, we end up with rates (and desk group names) with number suffix. That has severe negative impact on end-user experience.

@nikdo
nikdo / ornd-validations.md
Last active January 29, 2021 17:12
OfficeRnD entities validations for denizen app.

🚧 Deprecated. Validations moved to the Wiki.

🏢 Location

→ Space / Locations

  • Name
    • is present 🛡
    • is title-cased
    • is not longer than 30 characters 🛡
import React, { useState } from 'react';
import {
LayoutChangeEvent,
ScrollView,
ScrollViewProps,
View,
} from 'react-native';
export const OverflowScrollView: React.FC<ScrollViewProps> = ({
children,
@nikdo
nikdo / ux-priorities.md
Last active December 22, 2020 10:08
UX priorities

Misc

Stories

[152]: Corrupted data prevention

The only correct way how to create unsigned APK with React Native

TLDR;

Within andorid/app/build.gradle file, define staging build type, set bundleInStaging to true and produce unsigned APK by running ./gradlew assembleStaging

Too many cooks

There are many different suggestions on how to use react-native bundle command to produce React Native JavaScript bundle together with other resources and put them to the correct place so that ./assembleDebug can take them and create unsigned APK.

Mám:

days: [
  {
    dusk: "9:15",
    dawn: "18:45"
  },
  {
 dusk: "9:20",
@nikdo
nikdo / events-desired.md
Last active February 20, 2020 08:06
GitBoard WebSocket events

Single issue change

repositories/:id/issues/:number
{
  number: <number>
}
  • created
@nikdo
nikdo / ws_vs_rest_api.md
Last active November 14, 2019 15:01
WebSocket vs. REST API

WebSocket vs. REST API

How GitHub and Toggl use WebSocket to support their REST API.

GitHub

They use a single WebSocket connection:

↑ subscribe:notification-changed:492608
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Board test</title>
</head>
<style>
html, body { height: 100%; }
body {
margin: 0;