https://github.com/RichiH/vcsh
vcsh init <repo>
vcsh <repo> add <files>
vcsh <repo> commit -m "<message>"
vcsh <repo> remote add origin <remote>
vcsh <repo> push -u origin master
# [Choice] Ruby version: 2, 2.7, 2.6, 2.5 | |
ARG VARIANT=2 | |
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT} | |
ARG NODE_VERSION="lts/*" | |
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1" | |
# [Optional] Uncomment this section to install additional OS packages. | |
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | |
# && apt-get -y install --no-install-recommends <your-package-list-here> |
# Don't print a new line at the start of the prompt | |
add_newline = false | |
# Disables the line_break module, making the prompt a single line. | |
[line_break] | |
disabled = true | |
# Replace the "❯" symbol in the prompt | |
[character] | |
symbol = "$" |
https://github.com/RichiH/vcsh
vcsh init <repo>
vcsh <repo> add <files>
vcsh <repo> commit -m "<message>"
vcsh <repo> remote add origin <remote>
vcsh <repo> push -u origin master
# Prerequisites: | |
# | |
# * Add pronto, pronto-rubocop, and any other pronto runners to Gemfile's | |
# development group (TODO: how to run using standalone gems?) | |
# Add dotenv to project's Gemfile, if necessary (dotenv-rails includes | |
# it by default) | |
# * Create a GitHub API token: https://github.com/settings/tokens. | |
# Give it the following scopes: repo, repo:status | |
# See this tutorial for more info: | |
# https://christoph.luppri.ch/articles/2017/03/05/how-to-automatically-review-your-prs-for-style-violations-with-pronto-and-rubocop/ |
(Alex Gaynor, Python Software Foundation)
require 'spec_helper' | |
describe 'path/to/view.html.erb' do | |
it "renders JavaScript to connect to a pretend API" do | |
render | |
expect(rendered).to match("api_key: '#{ENV['API_KEY']}',") | |
expect(rendered).to match("api_endpoint: '#{ENV['API_KEY']}',") | |
end | |
end |
if Rails.env.development? | |
require 'faker' | |
namespace :obfuscate do | |
desc "Obfuscate user data" | |
task :users => :environment do | |
raise "Not to be run in production!" if Rails.env.production? | |
User.all.each do |user| | |
unless user.admin? | |
user.update_attributes( |
require 'date' | |
require 'minitest/autorun' | |
class SchoolYear | |
def self.date_range(day=Date.today.to_s) | |
d = Date.parse(day) | |
if d.month >= 8 | |
start_year = d.year | |
end_year = d.year + 1 | |
else |