Skip to content

Instantly share code, notes, and snippets.

View adg29's full-sized avatar
📱

Alan Garcia adg29

📱
View GitHub Profile
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<gpx creator="StravaGPX" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd" version="1.1" xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
<metadata>
<time>2020-09-01T22:39:17Z</time>
</metadata>
<trk>
<name>Two a day keeps the lethargy away - Evening Ride ☀️</name>
<type>1</type>
<trkseg>
<trkpt lat="40.6554810" lon="-73.9631390">
@adg29
adg29 / conditionalwrap.js
Created September 25, 2020 22:43 — forked from kitze/conditionalwrap.js
one-line React component for conditionally wrapping children
import React from 'react';
const ConditionalWrap = ({condition, wrap, children}) => condition ? wrap(children) : children;
const Header = ({shouldLinkToHome}) => (
<div>
<ConditionalWrap
condition={shouldLinkToHome}
wrap={children => <a href="/">{children}</a>}
>
@adg29
adg29 / AuthUserProvider.tsx
Created January 29, 2022 02:25
AuthUserProvider.tsx: Typescript woes
import { useReducer, useEffect } from "react";
import firebase from "firebase/compat/app";
import { User as FirebaseUser } from "firebase/auth";
import {
IAuthProvider,
mainReducer,
initialState,
AuthUserActionsTypes,
formatAuthUser,
authUserContext,
@adg29
adg29 / google-drive-api.js
Created October 6, 2025 16:22 — forked from trulymittal/google-drive-api.js
Gist to demonstrate Google Drive API using NodeJs
/*
Google Drive API:
Demonstration to:
1. upload
2. delete
3. create public URL of a file.
required npm package: googleapis
*/
const { google } = require('googleapis');