cat ~/.ssh/id_rsa.pub | ssh <user@host> 'cat >> .ssh/authorized_keys'adduser <name>| import { useLoadingMocked } from 'assets/__mocks__/useLoading'; | |
| // mock module as a function | |
| jest.mock('src/redux/loading', () => jest.fn()); | |
| import methodToMock from 'src/redux/loading'; | |
| const mockedMethod = methodToMock as jest.Mock; | |
| describe('testing a hook', () => { | |
| it('my test', () => { |
| const Comp = (props) => { | |
| const myRef = useRef() | |
| const [activeState, setActiveState] = useState(false) | |
| const callbackTrue = () => { | |
| // define callback | |
| setActiveState(true) | |
| } | |
| const callbackFalse = () => { |
| const concatComponents = (...listComponents) => listComponents | |
| const MyComp = (props) => { | |
| const myConcatenatedText = concatComponents( | |
| 'My text with ', | |
| <a>My link</a>, | |
| 'end of my text with', | |
| ) | |
| return ( |
| react | |
| ink | |
| ink-text-input | |
| typescript | |
| @types/react | |
| @types/node |
| state = [ | |
| action1, | |
| action1, | |
| ] | |
| // hook | |
| const useFilterPedingAction = key => state.filter(item => ( | |
| item.status === 'pending' && | |
| item.name === key | |
| )) |
| # set npm env | |
| export NPM_HOME=$HOME/.npm-global | |
| npm config set prefix $NPM_HOME | |
| # set node bin to path | |
| export PATH=$PATH:$NPM_HOME/bin |
| /* | |
| Enter your query here. | |
| Please append a semicolon ";" at the end of the query | |
| */ | |
| SELECT c.name, MAX(p.id) | |
| FROM customer as c, payment as p | |
| WHERE p.status LIKE "CO" and p.customer_id = c.id | |
| GROUP BY c.name | |
| /* | |
| Enter your query here. | |
| Please append a semicolon ";" at the end of the query | |
| */ | |
| SELECT c.name, MAX(p.id) | |
| FROM customer as c, payment as p | |
| WHERE p.status LIKE "CO" and p.customer_id = c.id | |
| GROUP BY c.name | |
| </div> | |
| <div> | |
| <strong>Marco Antônio</strong> | |
| <span style="margin: .8em"> | |
| <a style="text-decoration: none" href="https://linkedin.com/in/masouzajunior" title="LinkedIn" target="_blank"> | |
| <img width="13" height="13" src="https://www.getmailspring.com/signature-assets/linkedin.gif" alt="LinkedIn"> | |
| </a> | |
| <a style="text-decoration: none" href="https://github.com/marco-souza" title="GitHub" target="_blank" > |