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 / 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

@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 / 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 / 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 / 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 / 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 / styles.css
Created October 5, 2020 00:20
Ts Quote generator styles
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;400;600&display=swap');
html {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
min-height: 100vh;
@cziem
cziem / index.html
Last active October 8, 2020 11:59
TS Quote generator
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quotifr | Inspirational quotes for your daily start up</title>
<link rel="shortcut icon" href="assets/quote-icon.jpg" type="image/jpg">
<link rel="stylesheet" href="styles/styles.css">
<script defer src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"
integrity="sha384-SlE991lGASHoBfWbelyBPLsUlwY1GwNDJo3jSJO04KZ33K2bwfV9YBauFfnzvynJ"
@cziem
cziem / currencies.js
Created January 28, 2020 09:16
List of Countries, currencies and code
export const countries = [
{
code: "AE",
currency: "AED",
currencyName: "United Arab Emirates Dirham",
name: "United Arab Emirates"
},
{
code: "AF",
currency: "AFN",
@cziem
cziem / fly.js
Created October 21, 2019 10:59
Node script to spawn a new child process
const { spawn, exec } = require('child_process')
const drone = spawn('python', ['./src/controller/main.py'])
drone.stdout.pipe(process.stdout)