This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"go/ast" | |
"go/parser" | |
"go/token" | |
"io/ioutil" | |
"log" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ec | |
import ( | |
"crypto/ecdsa" | |
"crypto/elliptic" | |
"crypto/md5" | |
"crypto/rand" | |
"crypto/x509" | |
"encoding/pem" | |
"errors" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import { useState, useLayoutEffect } from 'react'; | |
/** | |
* This hook allows you to detect window size | |
* @param handler Function | |
* @return Object window size (number width, number height) | |
* */ | |
export function useWindowSize(handler: Function): { width: number, height: number } { | |
const isClient = typeof window === 'object'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import { useState, useLayoutEffect } from 'react'; | |
import type { ElementRef } from 'react'; | |
/** | |
* This react hook allows you to detect dragging and swiping | |
* @param ref HTML Element ref (react ref) | |
* @param handler Function Callback | |
* @param config Object | |
* @return Function remove listeners |