Skip to content

Instantly share code, notes, and snippets.

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

Oluwasetemi Ojo Oluwasetemi

🏠
Working from home
View GitHub Profile
{"Type":1,"Draft":false,"Body":"- **WIP**\n- **categorySlice Refactored**\n- **customer refactored**\n- **home refactored**\n- **refactored loans**\n- **tradeData Refactor**\n- **multiproviderfx refactored**\n- **payment refactored**\n- **currencyFx refactored**\n- **clean up multiple getstore usage in a single function**\n- **new**\n- **accountSlice and authSlice cleanup**\n- **bankSlice and companySlice**\n- **wallet, vendor, transaction, kyc, document**\n- **Merge branch 'dev' into feat/payments-mobile-respnsv**\n- **trying to provision renienv environment**\n- **add CircularProgress component**\n- **add MobileNavigation component**\n- **update MobileNavigation component**\n- **make page navigation responsive on mobile**\n- **create renienv amplify environment**\n- **add fluna Icon as svg**\n- **make payment screens mobile responsive**\n- **update packages**\n- **update top bar elements ui**\n- **get bank rates from bankexchangerates table**\n- **check is bank name exists and do comparison based on lower c
import 'temporal-polyfill/global'
const now = Temporal.Now.instant().toString()
const currentTimeZoneId = Temporal.Now.timeZoneId()
console.log(Temporal.Now.zonedDateTimeISO().toString())
const currentTimeZone= Temporal.Now.zonedDateTimeISO().toString()
// methods - zonedDateTimeISO, zoneDateTime, instant, timeZoneId, plainDateTimeISO, plainDateISO, plainTimeISO, plainDateTime, plainDate.
let financialCentres = {
// getData () => Promise<Data>
// postData (data: Data) => Promise<vo id>
/**
* 1. Every 10 seconds, request data via getData and pass the response to postData
* 2. If getData rejects, it should retry until it resolves successfully
* 3. If postData rejects, it should re-run, being passed the same data object, until it resolves successfully
* 4. Retries should happen immediately, it should not wait 10 seconds to retry
*
*
@Oluwasetemi
Oluwasetemi / schema.graphql
Last active August 23, 2022 14:49
current and updated schema for fluna-web-app
# This "input" configures a global authorization rule to enable public access to
# all models in this schema. Learn more about authorization rules here: https://docs.amplify.aws/cli/graphql/authorization-rules
input AMPLIFY {
globalAuthRule: AuthRule = { allow: public }
} # FOR TESTING ONLY!
type User
@model
@auth(
rules: [
{ allow: groups, groups: ["Admin"] }
@Oluwasetemi
Oluwasetemi / useTheme2.tsx
Created September 20, 2021 13:08 — forked from timc1/useTheme2.tsx
🌑☀️core app system/light/dark mode theming + varying themes for nested components
import * as React from "react";
type ThemeConfig = "system" | "light" | "dark";
type ThemeName = "light" | "dark";
// Custom themes are keyed by a unique id.
type KeyedThemes = {
[k: string]: {
config: ThemeConfig;
themeName: ThemeName;
};
@Oluwasetemi
Oluwasetemi / useTheme.tsx
Created September 20, 2021 13:08 — forked from timc1/useTheme.tsx
🌑☀️mode theming hook
import * as React from "react";
type Theme = "system" | "light" | "dark";
const STORAGE_KEY = "theme";
const VALID_THEMES: Theme[] = ["system", "light", "dark"];
const DARK_MODE_MEDIA_QUERY = "(prefers-color-scheme: dark)";
function getAppTheme(): Theme {
if (typeof window !== "undefined") {
@Oluwasetemi
Oluwasetemi / #game of life
Last active September 21, 2021 22:23
Testing John Conway's [Game of Life](https://playgameoflife.com/)
Testing John Conway's [Game of Life](https://playgameoflife.com/)
The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves.
It is Turing complete and can simulate a universal constructor or any other Turing machine.
@Oluwasetemi
Oluwasetemi / package.json
Last active March 4, 2021 10:48 — forked from kentcdodds/package.json
Validates that the versions of tools specified in `engines` in the package.json are installed on the machine.
{
"name": "workshop-computer-validator",
"version": "1.0.0",
"description": "I use this to validate people's computers have the proper versions of node and npm installed for a workshop",
"bin": "./validate-system.js",
"dependencies": {
"semver": "7.1.3"
}
}
@Oluwasetemi
Oluwasetemi / #contentful-apollo-rest-data-source
Last active August 10, 2022 18:33
A list of the REST data source I implemented using Apollo REST Data source
Contentful Apollo Rest Data Source
I wrote a rest data source for one of my client's
project to fetch data from contentful api to
a graphql backend. For more information - https://www.apollographql.com/docs/apollo-server/data/data-sources/
@Oluwasetemi
Oluwasetemi / findaword.js
Created October 5, 2020 16:17
HackerRank Dairy
function processData(input) {
var input = input.split('\n');
var n = parseInt(input[0]);
var sentences = input.slice(1, n + 1);
let t = parseInt(input[n+1]);
var words = input.slice(n+2);
if (words.length === t) {
console.log(processSentences(words, sentences).join('\n'))
};