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
| git config --global push.default current |
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
| export const compose = (...functions: Array<Function>) => (initial: any) => functions.reduce((acc, cur) => cur(acc), initial) | |
| export const pipe = (...functions: Array<Function>) => (initial: any) => functions.reverse().reduce((acc, cur) => cur(acc), initial) |
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
| export const parseSignedFacebookRequest = (signed_request) => { | |
| const [encoded_sig, payload] = signed_request.split("."); | |
| const secret = 'appsecret'; // Use your app secret here | |
| // decode the data | |
| const sig = base64Decode(encoded_sig); | |
| const data = JSON.parse(base64Decode(payload)); | |
| // confirm the signature |
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
| // this code is to make it easier to replace the deprecated mui-styles library, almost drop in | |
| import { SxProps } from '@mui/material' | |
| import { useMemo } from 'react' | |
| type TStylesFunction = ( | |
| props?: any, | |
| ) => Record<string, React.CSSProperties | SxProps> | |
| type TStyles = Record<string, React.CSSProperties | SxProps> | |
| export const makeStylesHook = (styles: TStylesFunction | TStyles) => { |
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
| curl -w "DNS Lookup Time: %{time_namelookup} \nConnect time: %{time_connect} \nTLS Setup: %{time_appconnect} \nRedirect Time: %{time_redirect} \nTime to first byte: %{time_starttransfer} \nTotal time: %{time_total} \n" $0 |
OlderNewer