Skip to content

Instantly share code, notes, and snippets.

@DVG
DVG / machine.js
Last active September 6, 2022 18:01
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@DVG
DVG / machine.js
Last active May 13, 2021 11:27
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions

By Non-Traditional, Meaning you are not paying a tuition to go to a school in pursuit of a degree. This is mostly self study resources that are cheap or free

Books

The Links Here May Contain NSFW Content

@DVG
DVG / Birthday List.md
Last active June 15, 2016 10:57
Birthday Ideas
  • New Nintendo 3DS
  • iTunes Gift Card $20 (For Star Wars coming out April 1st)
  • Final Fantasy Explorers For 3DS
  • Fire Emblem Fates

Gift Cards

  • Nintendo eShop
  • iTunes
  • PSN
@DVG
DVG / ff6.md
Last active January 21, 2016 21:53

                                                    S              S         S
                      O    L    T    E    S         h         C    e         t
                      w    o    e    d    a    C    a         e    t    R    r
                      n    c    r    g    b    y    d    G    l    z    e    a
                      e    k    r    a    i    a    o    a    e    e    l    g
                      d    e    a    r    n    n    w    u    s    r    m    o
Ramuh - +1 Stamina   [x]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]
    Thunder (10x)    [ ]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]  [ ]
@DVG
DVG / classy_delete_widget.coffee
Last active January 3, 2016 08:49
Delete Widget
class App.FancyDelete extends App.Object
constructor: (@_destroy_url, @_deleteSelector = '.js-delete', @_cancelSelector = '.js-cancel', @_deleteFilter = null, @_cancelFilter = null, @_container = "tr") ->
events = [new App.Event(@_deleteSelector, "click", @destroy, @_deleteFilter),
new App.Event(@_cancelSelector, "click", @cancel, @_cancelFilter)]
super(events)
destroy: (e) =>
e.preventDefault()
self = e.target
if self.find(".js-text").text() == "Delete"
@DVG
DVG / bradley_page_object.rb
Created December 13, 2013 16:32
Super simple page object pattern
require 'capybara'
require 'capybara/dsl'
include Capybara::DSL
Capybara.default_driver = :selenium
Capybara.run_server = false
# Keep selenium happy behind the proxy
ENV['no_proxy'] = "127.0.0.1"
ENV['NO_PROXY'] = "127.0.0.1"

Christmas List

Video Games

  • 3DS XL Charging Cradle - available here
  • PS Vita 32 Gb Memory Card
  • LEGO Marvel Super Heroes Xbox 360

Blu Rays

  • Wreck It Ralph
  • Game of Thrones Season 1 and 2
  • Dark Knight Rises

It's important to make sure your server-side app is secure when using a client-side application like Ember, since any user can alter your javascript at runtime to make it do whatever you want. Therefore you want to make sure you still use server-side validations to make sure that your persistant records are valid.

However, Ember doesn't include any built-in way of displaying these errors on a form like you might be used to coming from a Rails world. This is how I do it.

Let's take this login form as an example (using twitter bootstrap css):

<form class="form-horizontal" {{action sendRegistration on="submit"}}>
  <div class="control-group">
    <label class="control-label" for="email">Email</label>