STOP ALL CONTAINERS
$ docker stop $(docker ps -a -q)
REMOVE ALL CONTAINERS
$ docker rm $(docker ps -a -q)
class MyJob < ActiveJob::Base | |
queue_as :urgent | |
rescue_from(NoResultsError) do | |
retry_job wait: 5.minutes, queue: :default | |
end | |
def perform(*args) | |
MyService.call(*args) | |
end |
version: '3' | |
networks: | |
default: | |
driver: bridge | |
webproxy: | |
external: true | |
services: | |
db: |
import React from "react" | |
import Checkbox from "./Checkbox" | |
import { render, fireEvent, cleanup } from "react-testing-library" | |
afterEach(cleanup) | |
it("testa check", () => { | |
const { getByTestId } = render(<Checkbox />) | |
fireEvent.click(getByTestId("meucheck")) | |
expect(getByTestId("meucheck").value).toEqual("123"); |
class ActiveSupport::TestCase | |
def self.prepare | |
# Add code that needs to be executed before test suite start | |
end | |
prepare | |
def setup | |
# Add code that need to be executed before each test | |
end |
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'activerecord', '5.1.3' |
STOP ALL CONTAINERS
$ docker stop $(docker ps -a -q)
REMOVE ALL CONTAINERS
$ docker rm $(docker ps -a -q)
// app.js | |
const onPressOpenLink = async (url, title) => { | |
const { navigate } = props.navigation | |
navigate('Web', { url: url, title: title }) | |
} | |
// webview.js | |
import React, { useState, useEffect } from 'react' | |
import { WebView } from 'react-native-webview' |
Based on this comment
Fix warning when use react-hooks:
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
// shared/InputMask.js
import { Input } from 'antd'
import React, { forwardRef } from 'react'
To fix errors like..
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
...
could not open directory "pg_tblspc": No such file or directory
FROM ruby:2.6.2-alpine | |
ENV APP_HOME /src/app | |
ARG app_env | |
ENV RAILS_ENV $app_env | |
ENV RAILS_ROOT $APP_HOME | |
ENV RAILS_SERVE_STATIC_FILES 1 | |
ENV LANG C.UTF-8 | |
ENV PATH /root/.yarn/bin:$PATH |