-
Login to sendgrid
-
From the menu on the lefthand side click on Email API > Integration Guide
-
For VAP projects:
- Select SMTP Relay
- Name the key (usually the short name of the VAP instance)
- Click 'Create Key'
- From the 'Configure your application section' copy the Password (this is actually your API key)
- In Hatchbox (or SSH into the server for legacy versions) put the API key in your ENVs
-
The key is
SENDGRID_PASSWORD
and the value is the API key you just generated.
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
--- | |
include: | |
- "app/**/*.rb" | |
- "config/**/*.rb" | |
- "lib/**/*.rb" | |
exclude: | |
- spec/**/* | |
- vendor/**/* | |
- ".bundle/**/*" | |
require: |
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
module CDK | |
class RenderERB < Liquid::Tag | |
SYNTAX = /(?<path>#{Liquid::QuotedFragment})(?<locals>\s+.*)?/ | |
private_constant :SYNTAX | |
def initialize(tag_name, markup, tokens) | |
super | |
@data = SYNTAX.match(markup).named_captures | |
end |
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 "net/http" | |
require "yaml" | |
rubocop_config = YAML.load_file(".rubocop.yml") | |
rubocop_config.keys.each do |key| | |
if key.include? "/" | |
cop, rule = key.split("/") | |
docs = "rubocop" | |
if ["Performance", "Rails"].include? cop |
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
gem install ffi -v '1.9.17' -- --with-cflags="-Wno-error=implicit-function-declaration" |
- From the projects route click on 'Create Project'
- Select the proper platform from the provided list
- Vue for VAP frontends
- Rails for VAP APIs
- Under 'Set your default alert settings' select 'Alert me on every new issue'
- Name the project something unquie like the instance short name + frontend or api. eg: PSC would be PSC-frontend & PSC-api.
- Click 'Create Project'
You can ignore most of the next screen as each app already has sentry configured. What you need to grab is the DSN
from the configuration instructions and feed it to your instance via the proper ENV.
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 | |
| |
IP_ADDR_FILE="ip_addr.txt" | |
old_ip=$(cat $IP_ADDR_FILE) | |
current_ip=$(curl ifconfig.me/ip) | |
| |
if [ "$old_ip" != "$current_ip" ]; then | |
curl "https://username:[email protected]/nic/update?hostname=test.drbragg.ninja&myip=$current_ip" | |
rm $IP_ADDR_FILE | |
touch $IP_ADDR_FILE |
- Website: https://stimulusjs.org/
- GitHub repo: https://github.com/stimulusjs/stimulus
- Handbook: https://stimulusjs.org/handbook/introduction
- Discourse: https://discourse.stimulusjs.org/
initialize
: once, when the controller is first instantiatedconnect
: anytime the controller is connected to the DOM
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
# TABLE_NAME = the name of the table you need to reset the id sequence for | |
ActiveRecord::Base.connection.execute(%q{ | |
select setval('TABLE_NAME_id_seq', m) | |
from ( | |
select max(id) from TABLE_NAME | |
) as dt(m) | |
}) | |
# OR |
NewerOlder