Skip to content

Instantly share code, notes, and snippets.

View bootcoder's full-sized avatar

Hunter Chapman bootcoder

View GitHub Profile
@bootcoder
bootcoder / some_controller.rb
Created November 11, 2019 18:47
DRY up named arguments
# frozen_string_literal: true
class Api::V2::Users::UsersController < Api::V2::BaseController
soft_authentication :current
def current
user_json = ActiveModelSerializers::SerializableResource.new(current_user,{show_subscriptions: true}).as_json
raise AuthorizationError unless current_user
render json: user_json, status: :ok, show_subscriptions: true
@bootcoder
bootcoder / ReduxRootComponent.jsx
Last active November 5, 2018 19:16
ReduxRootComponent Architecture
// ReduxRootComponent.tsx
import React from 'react'
import { Provider } from 'react-redux'
import WebpackerReact from 'webpacker-react'
import configureStore from '../store/configureStore'
const store = configureStore()
@bootcoder
bootcoder / user_show.json
Created February 26, 2017 21:46
RBP - User Show
{
"first_name": "Tom",
"last_name": "TomTom",
"email": "tom@tom.com",
"phone": "(415) 555-0420",
"created_at": "2017-01-29T01:43:52.370Z",
"address": {
"line_1": "1 W Portal Ave",
"line_2": null,
"city": "San Francisco",
@bootcoder
bootcoder / .gitconfig
Created October 18, 2016 22:20
Git Config file from my master Mac
[core]
# Excludesfiles allows us to set a global list of things to ignore
excludesfile = ~/.gitignore_global
# These are custom color options for the console
[color]
status = auto
diff = auto
[color "status"]
@bootcoder
bootcoder / snippet.txt
Created September 15, 2016 17:34
notes
phone numbers -- format?
string == 3525678908
string == (352)5678908
string == (352)567-8908
string == 352.567.8908
string == 3525678908
error handling
@bootcoder
bootcoder / categories_controller.rb
Created August 25, 2016 00:53
baseline_RR_pattern
# Cat INDEX
get '/categories' do
@categories = Category.all
erb :'categories/index'
end
# Cat NEW
get '/categories/new' do
@category = Category.new
erb :'categories/new'
@bootcoder
bootcoder / snippet.txt
Created August 17, 2016 23:03
env-stuff-4james
ENV Stuff
1. postgres
- uninstall app client
- clean system of any prev postgres installs
- install via brew start via brew
2. ruby env - ensure versions management. If they have and want rvm,chruby,rbenv great.
If they don't or if env is fucked and they don't know how to fix obviously....
rbenv from scratch murdering all others in the face.
- checking which ruby
@bootcoder
bootcoder / ajax-pseudo.js
Last active August 16, 2016 22:58
horse-ajax-pseudo
/*
Relase 1 Psuedocode
- Make <form> and <a> tags functional
- Use horses/new as a partial that will be rendered with AJAX after user clicks on the appropriate link
- Create a new function to hold event listener for the #new-horse-link
- Confirm listener functions
- Use AJAX to intercept the HTTP request
- hide the #new-horse-link
- Modify controller @ route '/horses/new' to respond to xhr
- Confirm getting to route I think I need
@bootcoder
bootcoder / julQuery.js
Created July 19, 2016 22:48
miniQueryV2
var miniQuery = function(htmlElement){
var selector = htmlElement;
isElement = function(){
console.log("in isElement");
if(selector.nodeName != undefined){
return true;
}else{
return false;

Teaching Model Proposal

Current Problems

  • No Consistent Delivery of day to day student experience
  • No Consistent Delivery of Advisee/Advisor Relations
  • Instructor Stress / Burnout
  • Non equitable dispersement of responsibilities amongst staff

Proposed Solution