# Install ESLint and Babel ESLint
# Make sure to install at least v5.1.0 of ESLint
npm install --save-dev eslint babel-eslint
# Install the Airbnb configs (3 of them, listed below)
npx install-peerdeps --dev eslint-config-airbnb
# Install Prettier + ESLint config
npm install --save-dev --save-exact prettier eslint-config-prettier
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
for f in *.example; do | |
cp -- "$f" "${f%.example}" | |
done |
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
FROM ruby:2.5.1 | |
ENV LANG C.UTF-8 | |
RUN apt-get update -qq && \ | |
apt-get install -y --no-install-recommends \ | |
build-essential \ | |
libpq-dev \ | |
libfontconfig1 \ | |
less \ |
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 | |
jobs: | |
build: | |
working_directory: ~/mowers | |
docker: | |
- image: circleci/ruby:2.4.1-node | |
environment: | |
PGHOST: 127.0.0.1 | |
PGUSER: mower | |
RAILS_ENV: test |
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
#inside RSpec.configure | |
config.before :all do | |
SunspotTest.stub | |
end | |
config.before(:all, search: true) do | |
SunspotTest.setup_solr | |
Sunspot.remove_all! | |
Sunspot.commit |
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
require 'sunspot_ext/resque_session_proxy' | |
require 'sunspot_ext/resque_index_job' | |
Sunspot.session = Sunspot::ResqueSessionProxy.new(Sunspot.session) |
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
#!/bin/bash | |
# author: ramonrails.in | |
# version: 1.0 | |
# release date: 7-Aug-2017 | |
# license: MIT | |
# style for output | |
bold=$(tput bold) | |
cyan=$(tput setaf 6) |
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
brew install puma/puma/puma-dev && | |
sudo puma-dev -setup && | |
puma-dev -install && | |
security add-trusted-cert -k login.keychain-db ~/Library/Application\ Support/io.puma.dev/cert.pem |
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
# config/initializers/compression.rb | |
Rails.application.configure do | |
# Use environment names or environment variables: | |
# break unless Rails.env.production? | |
break unless ENV['ENABLE_COMPRESSION'] == '1' | |
# Strip all comments from JavaScript files, even copyright notices. | |
# By doing so, you are legally required to acknowledge | |
# the use of the software somewhere in your Web site or app: |
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
#!/usr/bin/env ruby | |
# Smarter be for ruby projects that prioritizes local project binstubs | |
# - uses zsh when needed, assuming MacOS Catalina or later | |
# - save on your path | |
# - drop the .rb | |
# - chmod +x | |
# - always type `be <command>` and the right thing should happen | |
# | |
# - inspired by Justin Searls (@searls) |
OlderNewer