- gem "sprockets-rails", ">= 3.4.2"
- gem "importmap-rails", ">= 1.0.1"
- gem "turbo-rails", ">= 1.0.0"
- gem "stimulus-rails", ">= 1.0.2"
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
new Promise(function(resolve, reject) { | |
setTimeout(() => resolve(1), 2000); | |
}).then((result) => { | |
alert(result); | |
return result + 2; | |
}).then((result) => { | |
throw new Error('FAILED HERE'); | |
alert(result); | |
return result + 2; |
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
"FR".codepoints | |
#=> [70, 82] | |
70 + 127397 | |
#=> 127467 | |
127467.chr(Encoding::UTF_8) | |
#=> "🇫" | |
82 + 127397 |
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
emoji_flag("AA") | |
#=> "🇦🇦" |
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
> emoji_flag("eu") | |
#=> "🇪🇺" |
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
"🇪🇺".chars | |
#=> ["🇪", "🇺"] |
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
version: '2' | |
services: | |
web: | |
build: . | |
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'" | |
volumes: | |
- .:/myapp | |
ports: | |
- "3000:3000" | |
depends_on: |
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
version: '7.0' | |
environment: | |
RAILS_ENV: development | |
compose: | |
files: | |
- docker-compose.yml | |
interaction: |
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
# .dockerdev/Dockerfile | |
ARG RUBY_VERSION | |
ARG DISTRO_NAME | |
FROM ruby:$RUBY_VERSION-slim-$DISTRO_NAME | |
# Common dependencies | |
RUN apt-get update -qq \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \ | |
build-essential \ |
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
# compose.yaml | |
version: '2.4' | |
x-app: &app | |
build: | |
context: .dockerdev | |
dockerfile: Dockerfile | |
args: | |
DISTRO_NAME: 'bullseye' | |
RUBY_VERSION: '3.1.2' |
OlderNewer