From the readme: https://github.com/danhper/asdf-python
If you use pip to install a module like ipython or flask that has a binaries. You will need to run asdf reshim python for the binary to be in your path.
asdf reshim python
CREATE GROUP ro_group; | |
CREATE USER <user_name> WITH password '<password>'; | |
ALTER GROUP ro_group ADD USER <user_name>; | |
GRANT USAGE ON SCHEMA "public" TO GROUP ro_group; |
prettier --write 'src/**/*.scss' | |
prettier --write 'src/**/*.css' | |
prettier --write 'src/**/*.js' | |
prettier --write 'src/**/*.jsx' | |
prettier --write 'src/**/*.html' | |
prettier --write 'public/**/*.html' |
From the readme: https://github.com/danhper/asdf-python
If you use pip to install a module like ipython or flask that has a binaries. You will need to run asdf reshim python for the binary to be in your path.
asdf reshim python
Clear and populate the database with fresh data:
rake db:populate
Clear the database:
rake db:clean
# frozen_string_literal: true | |
require 'rails_helper' | |
RSpec.describe Mutations::CreateUser, 'create user mutation' do | |
before(:all) do | |
@basic_mutation = <<-GRAPHQL | |
mutation CreateUser($firstName: String!, $lastName: String!, $ssn: String, $dob: ISO8601Date!) { | |
createUser(firstName: $firstName, lastName: $lastName, ssn: $ssn, dob: $dob) { | |
user { |
import runtimeEnv from '@mars/heroku-js-runtime-env' | |
const env = runtimeEnv() | |
const dotenv = require('dotenv') | |
dotenv.config() | |
export const { | |
REACT_APP_GRAPHQL_API_URL, | |
REACT_APP_BUGSNAG_KEY, |
import React, { Component } from 'react' | |
import mobiscroll from '@mobiscroll/react' | |
import PropTypes from 'prop-types' | |
import { withStyles } from '@material-ui/core/styles' | |
import TextInput from 'components/TextInput' | |
mobiscroll.settings = { | |
theme: 'material', | |
themeVariant: 'light', |
class ArrayValidator < ActiveModel::EachValidator | |
def validate_each(record, attribute, value) | |
array_elements_are_unique(record, attribute, value) | |
array_elements_are_subset_of_valid_list(record, attribute, value, options[:with]) | |
field_is_present(record, attribute, value) | |
end | |
def array_elements_are_unique(record, attribute, value) | |
if value.present? && (value.uniq.size < value.size) | |
record.errors.add(attribute, 'are duplicated') |
#config/initializers/log_constants | |
module LogConstantLoading | |
@@log_depth = 0 | |
def load_missing_constant(from_mod, const_name) | |
log_loading("load_missing_constant(#{from_mod}, #{const_name})") do | |
super | |
end | |
end |
// Import component and react-hook-form | |
import { DevTool } from "@hookform/devtools"; | |
import { useForm } from "react-hook-form"; | |
// Grab the control object form from the useForm hook | |
const { control, register, handleSubmit, errors } = useForm() | |
// Add component to wherever on the page | |
<DevTool control={control} /> |