Create droplet of your liking (ubuntu 12.04 x32) Use an xx.04 LTS version
On Digital Ocean, create a DNS entry for your server (xyz.com)
Make sure it has NS records that use digital oceans nameservers
import path from 'path'; | |
import { fileURLToPath } from 'url'; | |
import comments from '@eslint-community/eslint-plugin-eslint-comments/configs'; | |
import { fixupConfigRules } from '@eslint/compat'; | |
import { FlatCompat } from '@eslint/eslintrc'; | |
import js from '@eslint/js'; | |
import eslintConfigPrettier from 'eslint-config-prettier'; | |
import jsdoc from 'eslint-plugin-jsdoc'; | |
import * as regexpPlugin from 'eslint-plugin-regexp'; |
if ( | |
process.env.NODE_ENV === 'production' && | |
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ && | |
Object.keys(window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers).length | |
) { | |
window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers = {} | |
} |
# paste script into IRB shell | |
# cherry-pick gems to update | |
gems = %w( | |
newrelic_rpm | |
travis | |
some_other_gem | |
) | |
gems.each do |gem| | |
puts "updating #{gem}" | |
system "bundle update #{gem}" |
class API::V1::BaseController < ApplicationController | |
skip_before_filter :verify_authenticity_token | |
before_filter :cors_preflight_check | |
after_filter :cors_set_access_control_headers | |
def cors_set_access_control_headers | |
headers['Access-Control-Allow-Origin'] = '*' | |
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
Create droplet of your liking (ubuntu 12.04 x32) Use an xx.04 LTS version
On Digital Ocean, create a DNS entry for your server (xyz.com)
Make sure it has NS records that use digital oceans nameservers
=begin | |
Notes | |
===== | |
Labels: On the label you should put a "for" attribute if you're not using something like simple_form | |
This helps capybara to find your field | |
e.g. <label for="my_field_id">Some label</label> | |
=end | |
field = "Label on my field" | |
value = "existing option in list" |
app_home = "/home/mi/production" | |
workers = 5 | |
Bluepill.application("mi_delayed_job", :log_file => "#{app_home}/shared/log/bluepill.log") do |app| | |
(0...workers).each do |i| | |
app.process("delayed_job.#{i}") do |process| | |
process.working_dir = "#{app_home}/current" | |
process.start_grace_time = 10.seconds | |
process.stop_grace_time = 10.seconds | |
process.restart_grace_time = 10.seconds |