Skip to content

Instantly share code, notes, and snippets.

View hpjaj's full-sized avatar

Harry Levine hpjaj

View GitHub Profile
# vets-api/lib/evss/pciu/service.rb
require 'common/client/base'
module EVSS
module PCIU
class Service < EVSS::Service
include Common::Client::Monitoring
configuration EVSS::PCIU::Configuration
# vets-api/app/controllers/v0/profile/emails_controller.rb
module V0
module Profile
class EmailsController < ApplicationController
before_action { authorize :evss, :access? }
# Fetches the email address, and its effective datetime, for the current user
#
# @return [Response] Sample response.body:

Inside of the index.html file:

starting HTML

<!DOCTYPE html>

add html tags

<!DOCTYPE html>
  #person_id bidirectional sync with #owner_id and #position
    when owner_id and position are set
      and the position == 1
        should set the person_id with the associated person's id
        should not re-update the #owner_id or #position
      and the position == 2
        should set the person_id with the associated person's id
    when owner_id and position are updated
 should update the person_id with the associated person's id

Of 27,168 PartnerImport records that have been created between 10/9/17 - 11/16/17 (midday), two of them did not have an associated Owner record. And therefore, nor did they have an associated Person record.

Those PartnerImport ids are:

1320663
1365573

You can see this corroborated in prod's rails console:

➜  min-heap-binary-tree git:(master) ✗ git checkout -b test-branch
M	min_heap_binary_tree.rb
Switched to a new branch 'test-branch'

➜  min-heap-binary-tree git:(test-branch) ✗ git add .

➜  min-heap-binary-tree git:(test-branch) ✗ git commit -m "Demonstrates creating a branch and pushing changes to GitHub"
[test-branch ee3e533] Demonstrates creating a branch and pushing changes to GitHub
 1 file changed, 2 insertions(+)
{
    "results": [
        {
            "country": "us",
            "hometown": "Denver",
            "city": "Denver",
            "topics": [
                {
                    "urlkey": "web-development",

Ruby on Rails Fullstack Developer Independent Learning Syllabus

Over the last few years I have been asked what I did, outside and during Bloc.io, to become a Ruby on Rails fullstack web developer. As such, here is somewhat of a syllabus of online course content that I did before and during Bloc.

Very Beginning

Here is a video that I created for a buddy of mine that was starting from ground zero. No experience with HTML or CSS at all, as well as no experience with Ruby, Rails, etc.: https://youtu.be/zG6iBUbIjaw

If you are in the same boat, I would actually recommend starting with the content from this video, then move forward, if you have the time.

➜ client git:(master) npm run build:development:watch
> @powerhome/nitro-client@0.0.1 build:development:watch /Users/harrylevine/Dropbox/Coding/MojoLingo/PHRG/pws/client
> node_modules/@powerhome/nitro_react/node_modules/.bin/webpack -w --config webpack.config.js
sh: node_modules/@powerhome/nitro_react/node_modules/.bin/webpack: No such file or directory
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT

Here are the successful results of hitting the endpoint in demo17

{
  "projects": [
    {
      "id": 690843,
      "project_number": "32-58524",
      "home": {
        "id": 6603773,