This file contains 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
[alias] | |
sync = remote add origin | |
ci = "!f() { git commit -m \"$*\"; }; f" | |
co = checkout | |
cm = checkout master | |
cb = checkout -b | |
st = status -sb | |
sf = show --name-only | |
ps = push | |
pom = push origin master -u |
This file contains 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
const { resolve } = require('path'); | |
module.exports = { | |
env: { | |
browser: true, | |
es6: true, | |
jest: true, | |
}, | |
globals: { | |
Atomics: 'readonly', |
This file contains 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
root = true | |
[*] | |
ident_style = space | |
ident_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
This file contains 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
@import url('https://fonts.googleapis.com/css?family=Roboto:400,700,800&display=swap'); | |
* { | |
margin: 0; | |
padding: 0; | |
outline: 0; | |
box-sizing: border-box; | |
} | |
body { |
This file contains 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
<meta httpEquiv="x-ua-compatible" content="IE=edge,chrome=1" /> | |
<meta name="MobileOptimized" content="320" /> | |
<meta name="HandheldFriendly" content="True" /> | |
<meta name="theme-color" content="#121214" /> | |
<meta name="msapplication-TileColor" content="#121214" /> | |
<meta name="referrer" content="no-referrer-when-downgrade" /> | |
<meta name="google" content="notranslate" /> | |
<meta property="og:title" content={pageTitle} /> | |
<meta property="og:description" content={description} /> |
This file contains 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
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 16, | |
// font family with optional fallbacks | |
fontFamily: 'Fira Code, Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', | |
// default font weight: 'normal' or 'bold' | |
fontWeight: 500, |
This file contains 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
import { useState, useEffect, useContext, createContext } from 'react' | |
import axios from 'axios' | |
const FetchContext = createContext() | |
const url = 'https://jsonplaceholder.typicode.com/posts' | |
const FetchProvider = ({ children }) => { | |
const [posts, setPosts] = useState([]) |
This file contains 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
//usage: routes.use(authMiddleware) in line above of the following authenticated routes | |
import jwt from 'jsonwebtoken' | |
import { promisify } from 'util' | |
import authConfig from '../config/auth' | |
export default async (req, res, next) => { | |
const authHeader = req.headers.authorization |
This file contains 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
const toggleStreetView = useCallback(() => { | |
const panorama = mapRef.current.getStreetView() | |
panorama.setPosition({ | |
lat: -16.7033165, | |
lng: -49.2747676, | |
}) | |
panorama.setPov({ | |
heading: 265, | |
pitch: 0, | |
}) |
This file contains 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
// Usage: dispatch(upload(createFormDataDocuments([...event.target.files]))) | |
export const createFormData = (data, isCamelized = false) => { | |
const formData = new FormData() | |
Object.keys(data).forEach(field => { | |
const fieldValue = data[field] | |
const formDataValue = (() => { | |
if (!fieldValue) { | |
return '' | |
} |
OlderNewer