Skip to content

Instantly share code, notes, and snippets.

View cziem's full-sized avatar
:octocat:
Coding

Favour George C cziem

:octocat:
Coding
View GitHub Profile
@cziem
cziem / tsconfig.json
Created October 9, 2020 00:16
Ts Quote Generator Config
{
 "compilerOptions": {
 "sourceMap": true,
 "target": "es5",
 "lib": [
 "dom",
 "dom.iterable",
 "ES2015"
 ],
 "module": "CommonJS",
@cziem
cziem / app.ts
Created October 9, 2020 00:32
Typescript converted file
const quoteContainer = document.getElementById('quote-container');
const loader = document.getElementById('loader');
const quoteText = document.getElementById('quote');
const authorText = document.getElementById('author');
const twitterBtn = document.getElementById('twitter');
const newQuoteBtn = document.getElementById('new-quote');
interface QuoteData {
quoteAuthor: string;
quoteText: string;
@cziem
cziem / braces.js
Created November 10, 2020 07:54
Brace matcher that returns a "YES" or "NO" for a given array item
function braces(values) {
if (values.length === 1) return ["NO"];
const map = {
"(": ")",
"[": "]",
"{": "}"
};
const closing = Object.values(map);
@cziem
cziem / printMessage.jsx
Created December 1, 2020 15:05
Print message to the screen every 1 second
import React from "react";
const PrintMessage = () => {
const fontFamilies = ["arial", "cursive", "monospace", "sans-serif", "sans"];
let [count, setCount] = React.useState(0);
const printMessage = () => {
return <span className={`${fontFamilies[count]} world`}>World</span>;
};
@cziem
cziem / largeNumber.js
Created December 1, 2020 15:06
Return only sorted large pairs
// inputData = 64,120
// 63,121
// 65,100
// 70,150
// 56,90
// 75,190
// 60,95
// 68,110
function writeOutput(inputData) {
@cziem
cziem / iphone_media_query.md
Created May 17, 2021 09:59 — forked from weird-coon/iphone_media_query.md
CSS media query iPhone breakpoint

iPhone 11

/* 1792x828px at 326ppi */
@media only screen 
    and (device-width: 414px) 
    and (device-height: 896px) 
    and (-webkit-device-pixel-ratio: 2) { }

This media query is also for: iPhone XR