Skip to content

Instantly share code, notes, and snippets.

View CEOehis's full-sized avatar
🏠
Working from home

Celestine Ekoh-Ordan CEOehis

🏠
Working from home
View GitHub Profile
Email: 982092332@qq.com
SN: GAWAE-FCWQ3-P8NYB-C7GF7-NEDRT-Q5DTB-MFZG6-6NEQC-CRMUD-8MZ2K-66SRB-SU8EW-EDLZ9-TGH3S-8SGA

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@CEOehis
CEOehis / react_formik_yup_checkbox_validation.md
Created January 20, 2021 12:24 — forked from mrtony/react_formik_yup_checkbox_validation.md
React formik yup checkbox, radio button validation
import "./formik-demo.css";
import React from "react";
import { render } from "react-dom";
import { Formik, Field } from "formik";
import Yup from "yup";
import classNames from "classnames";

// Input feedback
/*
Problem:
Given a singly linked list and an integer k, remove the kth last element from the list. k is guaranteed to be smaller than the length of the list.
The list is very long, so making more than one pass is prohibitively expensive.
Do this in constant space and in one pass.
*/
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>Stylight Currency Converter</header>
<section>
<span>
const DEFAULT_CURRENCY = 'EUR';
const baseURL = 'http://data.fixer.io/api';
const accessToken = 'xxxxxxx';
const currencySymbols = ['USD', 'EUR', 'JPY'];
const symbolsAPIUrl = `${baseURL}/latest?access_key=${accessToken}&symbols=${currencySymbols.join(',')}&format=1`;
const sourceInput = document.getElementById('source');
const targetInput = document.getElementById('target');
import React from 'react';
import { shallow } from 'enzyme';
import DropdownSelect from '../DropdownSelect';
describe('<DropdownSelect />', () => {
const choices = ['manager', 'associate'];
const onChange = () => {};
it('renders fine', () => {
const wrapper = shallow(<DropdownSelect value="" size="245px" choices={choices} onChange={onChange} />);
expect (wrapper).toMatchSnapshot();

TIL

Blob: means Binary Larg Object. A blob is a lob(large object) type. A log is used to hold larges strings that do not necessarily fit in memory.

BLOB: Binary Large Object CLOB: Character Large Object

@CEOehis
CEOehis / microservices.md
Created June 1, 2019 15:00
Notes from Microservices course

What are microservices

  • An approach to developing a single application as a suite of small services
  • Independently deployable, using automated deployment tools
  • Enable apps to be built by multiple teams using multiple tech stacks

Advantages

  • They help decrease the cost of change
  • Works very well in Devops context

Algorithmic Complexity

It is important to try as much as you can to get the order of complexity of your algorithms to be higher up the following heirachy than lower.

  • O(1): constant time
  • O(log n): logarithmic
  • O(n): linear
  • O(n log n): loglinear
  • O(n^C): polynomial
  • O(C^n): exponential