type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
Rails can generate a lot of things for you. Personally I use generate model often to quickly setup a new model, including test files and a database migration. In its simplest form it looks like this:
rails generate productThis will get you started with a naked Product model. To make things easier, you can also supply attribute names:
rails generate product name description:text app/views/layouts/application.html.erb<!DOCTYPE html>
<html>
<head>
<title>Turboapp</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>```ruby
gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'master' # optional!!! (only for use in seed.rb)
gem 'faraday' # optional!!! (only for use in seed.rb)
gem 'gravatar_image_tag', github: 'secretpray/gravatar_image_tag', branch: 'master'
gem 'hotwire-rails' # optional!!!
gem 'image_processing', '~> 1.2'
gem 'tailwindcss-rails', '~> 0.5.1' # optional!!!
```
| Advance Tooltip | |
| --------------- |
| // Timer 5 sec -> count = 5000 | |
| // stop timer -> running = false | |
| var count = 5000, | |
| running = true, | |
| secondsNode = document.getElementById("seconds"), | |
| millisecondsNode = document.getElementById("milliseconds"), | |
| mOld, | |
| mNew; |
| 1) yarn add bootstrap | |
| 2) yarn add @popperjs/core | |
| 3.1) in folder 'app/javascript/' create new folder 'stylesheets': | |
| mkdir app/javascript/stylesheets/ | |
| 3.2) in new folder 'stylesheets' create file 'application.scss' | |
| cd app/javascript/stylesheets/ | |
| touch application.scss |
| https://www.robinwieruch.de/react-hooks-fetch-data | |
| useEffect(() => { | |
| let didCancel = false; | |
| async function fetchMyAPI() { | |
| let url = 'http://something/' + productId; | |
| let config = {}; | |
| const response = await myFetch(url); | |
| if (!didCancel) { // Ignore if we started fetching something else |