Skip to content

Instantly share code, notes, and snippets.

Evan Sparkman esparkman

Block or report user

Report or block esparkman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View application.html.erb
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag ',400i,500,600,700' %>
View console.log
ourceMap: false, cssnanoOptions: [Object] } },
HashedModuleIdsPlugin {
{ context: null,
hashFunction: 'md4',
hashDigest: 'hex',
hashDigestLength: 4 } },
NamedChunksPlugin { nameResolver: [Function] },
PreloadPlugin {
esparkman / error.txt
Last active May 3, 2019
netlify build error
View error.txt
Error: ./src/pages/index.js
12:49:02 PM: Module not found: Error: Can't resolve '../components/Layout' in '/opt/build/r epo/src/pages'
12:49:02 PM: resolve '../components/Layout' in '/opt/build/repo/src/pages'
12:49:02 PM: using description file: /opt/build/repo/package.json (relative path: ./src/p ages)
12:49:02 PM: Field 'browser' doesn't contain a valid alias configuration
12:49:02 PM: using description file: /opt/build/repo/package.json (relative path: ./src /components/Layout)
12:49:02 PM: no extension
12:49:02 PM: Field 'browser' doesn't contain a valid alias configuration
12:49:02 PM: /opt/build/repo/src/components/Layout doesn't exist
12:49:02 PM: .mjs

Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password

The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.

First the simplest/core layers, then optional layers depending on which features/functionality you want.

AUTHOR Ira Herman
LANGUAGE/STACK Ruby on Rails Version 4 or 5
View error
vue.runtime.esm.js?2b0e:587 [Vue warn]: Property or method "policy_holder" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See:
found in
---> <PolicyHolder> at src/components/PolicyHolder.vue
<App> at src/App.vue
warn @ vue.runtime.esm.js?2b0e:587
warnNonPresent @ vue.runtime.esm.js?2b0e:1872
get @ vue.runtime.esm.js?2b0e:1914
View vscode_settings.json
"editor.fontSize": 16,
"editor.fontLigatures": true,
"editor.fontFamily": "Fira Code",
"editor.tabSize": 2,
"editor.minimap.enabled": false,
"terminal.integrated.fontSize": 14,
"terminal.integrated.scrollback": 10000,
"git.path": "/usr/bin/git",
"workbench.colorTheme": "Dracula Soft",
esparkman / form_object.rb
Created May 4, 2018
Form Object Example
View form_object.rb
# used to share results from one user to another
# ensures that valid data is supplied and errors out if the parameters are invalid
class BookingFormModel
include ActiveModel::Model
attribute :first_name, :string
attribute :last_name, :string
attribute :stay_duration_days, :integer
def persisted?
View error.txt
NameError: uninitialized constant Datadog
/var/www/apps/legacy_dashboards_staging/releases/20180302190521/config/initializers/datadog_tracer.rb:3:in `<top (required)>'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties- `block (2 levels) in <class:Engine>'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties- `each'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties- `block in <class:Engine>'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties- `instance_exec'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties- `run'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties- `block in run_initializers'
# Your init script
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
# An example hack to log to the console when each text editor is saved.
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
You can’t perform that action at this time.