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
| // Altere o script e cole ele no console do strapi. | |
| // npx strapi console | |
| function changePassword(email, password) { | |
| strapi.admin.services.user.findOne({ email: email }).then(user => { | |
| if (user) { | |
| strapi.admin.services.auth.hashPassword(password).then(hashedPassword => { | |
| strapi.query('user', 'admin').update({ id: user.id }, { password: hashedPassword }) | |
| .then(() => console.log('Atualizado com sucesso.')) | |
| .catch((err) => console.error('Erro ao atualizar a senha.', err)) |
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
| Create a new file named commitlint.config.js with content: | |
| module.exports = { | |
| extends: ['@commitlint/config-conventional'] | |
| } | |
| Add in package.json: | |
| "husky": { | |
| "hooks": { |
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
| import React from 'react'; | |
| import {ScrollView} from 'react-native'; | |
| import { RootContainer, Content, Scroll } from './styles'; | |
| export default function ContentAware({rootStyle, contentStyle, children}) { | |
| return ( | |
| <RootContainer style={rootStyle}> | |
| <Scroll style={contentStyle}> | |
| {children} |
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
| MYSQL_ROOT_PASSWORD=root | |
| MYSQL_DATABASE=dbname |
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
| [alias] | |
| ci = commit | |
| co = checkout | |
| cm = checkout master | |
| cb = checkout -b | |
| st = status -sb | |
| sf = show --name-only | |
| lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
| incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
| outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) |
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
| import { ApolloClient } from "apollo-client"; | |
| import { ApolloLink } from "apollo-link"; | |
| import { HttpLink } from "apollo-link-http"; | |
| import { onError } from "apollo-link-error"; | |
| import { InMemoryCache } from "apollo-cache-inmemory"; | |
| import { getToken } from "./token"; | |
| import * as Toast from "./notification"; |
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
| MYSQL_ROOT_PASSWORD=root | |
| MYSQL_DATABASE=database |
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
| MYSQL_ROOT_PASSWORD=root | |
| MYSQL_DATABASE=database_name |
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
| import React from 'react'; | |
| import Routes from '~/routes'; | |
| import {ApolloProvider} from '@apollo/react-hooks'; | |
| import client from '~/services/apollo'; | |
| const App = () => { | |
| return ( | |
| <ApolloProvider client={client}> | |
| <PaperProvider theme={theme}> |
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
| doLast { | |
| def moveFunc = { resSuffix -> | |
| File originalDir = file("${resourcesDir}/drawable-${resSuffix}") | |
| if (originalDir.exists()) { | |
| File destDir = file("${resourcesDir}/drawable-${resSuffix}-v4") | |
| ant.move(file: originalDir, tofile: destDir) | |
| } | |
| } | |
| moveFunc.curry("ldpi").call() | |
| moveFunc.curry("mdpi").call() |
NewerOlder