👤 Shivansh Thapliyal
⭐ Star this Gist
(Photo by Dominik Lückmann)
def localProperties = new Properties() | |
def localPropertiesFile = rootProject.file('local.properties') | |
if (localPropertiesFile.exists()) { | |
localPropertiesFile.withReader('UTF-8') { reader -> | |
localProperties.load(reader) | |
} | |
} | |
def flutterRoot = localProperties.getProperty('flutter.sdk') | |
if (flutterRoot == null) { |
👤 Shivansh Thapliyal
⭐ Star this Gist
(Photo by Dominik Lückmann)
FROM ruby:2.6.5-alpine | |
RUN apk add --update --no-cache bash build-base nodejs sqlite-dev tzdata postgresql-dev yarn | |
RUN gem install bundler:2.1.4 | |
WORKDIR /usr/src/app | |
COPY package.json yarn.lock ./ | |
RUN yarn install --check-files |
<template> | |
<div id="app"> | |
<p>{{ message }}</p> | |
</div> | |
</template> | |
<script> | |
export default { | |
data: function () { | |
return { |
FROM ruby:2.3.1 | |
# Install dependencies | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
# Set an environment variable where the Rails app is installed to inside of Docker image: | |
ENV RAILS_ROOT /var/www/app_name | |
RUN mkdir -p $RAILS_ROOT | |
# Set working directory, where the commands will be ran: |
# make sure to replace `<hash>` with your gist's hash
git clone https://gist.github.com/<hash>.git # with https
git clone git@gist.github.com:<hash>.git # or with ssh
source "https://rubygems.org" | |
# ruby web server; run Sidekiq::Web with e.g. `puma --port=80` | |
# https://github.com/puma/puma | |
gem "puma" | |
# provides Sidekiq::Web monitoring UI | |
# https://github.com/mperham/sidekiq/wiki/Monitoring | |
gem "sidekiq", "~> 4.2" |
# File: app/controllers/api/api_controller.rb | |
class Api::ApiController < ActionController::Base | |
# Consider subclassing ActionController::API instead of Base, see | |
# http://api.rubyonrails.org/classes/ActionController/API.html | |
protect_from_forgery with: :null_session | |
before_action :authenticate | |
def self.disable_turbolinks_cookies | |
skip_before_action :set_request_method_cookie |