Skip to content

Instantly share code, notes, and snippets.

View doylemark's full-sized avatar

Mark Doyle doylemark

  • Dublin, Ireland
View GitHub Profile
@doylemark
doylemark / firebase-context.tsx
Created August 18, 2023 11:16
React Context Provider for Firebase
import {
createContext,
ReactNode,
useContext,
useEffect,
useState,
} from "react";
import { initializeApp, getApps, getApp, FirebaseApp } from "firebase/app";
import { getFirestore, Firestore } from "firebase/firestore/lite";
import { Auth, getAuth, User } from "firebase/auth";
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
typedef struct matrix
{
size_t size;
int** values;
} matrix_t;
@doylemark
doylemark / binary.c
Created November 14, 2021 21:59
Print an integer in base two representation
#include <stdio.h>
int findBinary(int n)
{
if (n == 0)
{
return 0;
}
return (n % 2 + 10 * findBinary(n / 2));
We do not store any user data.
@doylemark
doylemark / points.json
Created December 11, 2020 17:39
Continents
[[1.5,2046.5],[1.5,2031.5],[1.5,2016.5],[1.5,2001.5],[1.5,1986.5],[1.5,276.5],[1.5,261.5],[1.5,246.5],[1.5,216.5],[16.5,2046.5],[16.5,2031.5],[16.5,2016.5],[16.5,2001.5],[16.5,1986.5],[16.5,276.5],[16.5,261.5],[16.5,246.5],[16.5,216.5],[31.5,2046.5],[31.5,2031.5],[31.5,2016.5],[31.5,2001.5],[31.5,1986.5],[31.5,276.5],[31.5,261.5],[46.5,2046.5],[46.5,2031.5],[46.5,2016.5],[46.5,2001.5],[46.5,1986.5],[46.5,276.5],[46.5,261.5],[61.5,2046.5],[61.5,2031.5],[61.5,2016.5],[61.5,2001.5],[61.5,1986.5],[61.5,426.5],[61.5,276.5],[61.5,261.5],[76.5,2046.5],[76.5,2031.5],[76.5,2016.5],[76.5,2001.5],[76.5,1986.5],[76.5,291.5],[76.5,276.5],[76.5,261.5],[91.5,2046.5],[91.5,2031.5],[91.5,2016.5],[91.5,2001.5],[91.5,1986.5],[91.5,336.5],[91.5,276.5],[91.5,261.5],[106.5,2046.5],[106.5,2031.5],[106.5,2016.5],[106.5,2001.5],[106.5,1986.5],[106.5,1971.5],[106.5,276.5],[121.5,2046.5],[121.5,2031.5],[121.5,2016.5],[121.5,2001.5],[121.5,1986.5],[121.5,1971.5],[121.5,306.5],[136.5,2046.5],[136.5,2031.5],[136.5,2016.5],[136.5,2001.5],[
[
{
"name": "Hartsfield-Jackson Atlanta Intl GA",
"icao": "KATL",
"coordinates": [
-84.426944,
33.640444
],
"flights": 95
},
@doylemark
doylemark / animated-hamburger-menu.markdown
Created February 17, 2019 01:32
Animated Hamburger Menu
@doylemark
doylemark / animation-svg-hamburger-icon.markdown
Created February 17, 2019 01:29
Animation SVG hamburger icon