Skip to content

Instantly share code, notes, and snippets.

View davideghz's full-sized avatar
coding

Davide davideghz

coding
View GitHub Profile
@davideghz
davideghz / rails - delete orphan migration
Created March 13, 2018 10:01
delete orphan migration
rails dbconsole
delete from schema_migrations where version='<MIGRATION_ID>';
enjoy :)
@davideghz
davideghz / Ruby on Rails Production Checklist.md
Last active April 7, 2020 06:14
Ruby/Rails Production Checklist

Models

  • Secure models have validations and specs
    • validate presence
    • validate range
  • Secure models have associations and specs
  • Scopes must be tested
  • Provide localization when necessary (Globalize)
  • Implement support for ActiveAdmin's Resource if necessary

Controller

@davideghz
davideghz / index.html
Last active February 22, 2024 14:42
Active Campaign embed form
<style>@import url(https://fonts.bunny.net/css?family=kufam:400,700|IBM+Plex+Sans:400);</style>
<style>
#_form_3_{font-size:14px;line-height:1.6;font-family:arial, helvetica, sans-serif;margin:0}#_form_3_ *{outline:0}._form_hide{display:none;visibility:hidden}._form_show{display:block;visibility:visible}#_form_3_._form-top{top:0}#_form_3_._form-bottom{bottom:0}#_form_3_._form-left{left:0}#_form_3_._form-right{right:0}#_form_3_ input[type="text"],#_form_3_ input[type="tel"],#_form_3_ input[type="date"],#_form_3_ textarea{padding:6px;height:auto;border:#979797 1px solid;border-radius:4px;color:#000000 !important;font-size:14px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#_form_3_ textarea{resize:none}#_form_3_ ._submit{-webkit-appearance:none;cursor:pointer;font-family:arial, sans-serif;font-size:14px;text-align:center;background:#7B5800 !important;border:0 !important;-moz-border-radius:12px !important;-webkit-border-radius:12px !important;border-radius:12px !important;color:#