Skip to content

Instantly share code, notes, and snippets.

View mattiasrunge's full-sized avatar

Mattias Runge-Broberg mattiasrunge

View GitHub Profile
/* global gapi */
import React from "react";
const useAuthenticateWithGoogle = (apiKey, clientId, scopes) => {
const [ loading, setLoading ] = React.useState(false);
const [ authenticated, setAuthenticated ] = React.useState(false);
const [ error, setError ] = React.useState(null);
React.useEffect(() => {
@mattiasrunge
mattiasrunge / utctimestamp.c
Created May 10, 2012 21:25
Get UTC epoch timestamp function
#include <stdio.h>
#include <time.h>
#include <string.h>
/**
* This function returns a UTC epoch timestamp based on
* the supplied time information.
*
* @param [in] second Seconds [0-59]