Skip to content

Instantly share code, notes, and snippets.

View nogtini's full-sized avatar

Joey Di Nardo nogtini

  • Virginia Beach, VA
View GitHub Profile
import numpy as np
import math, os
'''
This application maps notes of a decimal time domain to a binary, a-metric domain,
such that each measure represents exactly one second and notation is accurate to within 30 ms.
1 = 1/4note
2 = 1/8note
4 = 1/16 note
8 = 1/32 note
@nogtini
nogtini / PizzaOrder.interactors.ts
Last active April 18, 2018 17:43
Interactor example for PizzaOrder
import {DisplayModal} from '@actions/PizzaOrder.actions';
import {AddTopping, AddCrustType} from '@actions/PizzaOrder.actions';
// namespace actions specific only to theme
export const PizzaOrderInteractors = {
AddTopping: AddTopping,
AddCrustType: AddCrustType,
DisplayModal: DisplayModal
};
@nogtini
nogtini / PizzaOrder.selectors.ts
Last active April 18, 2018 17:51
PizzaOrder Selector example
import { createSelector, createFeatureSelector } from '@ngrx/store';
const selectUser = createFeatureSelector('user');
const selectDriver = createFeatureSelector('driver');
const selectPizzaOrder = createFeatureSelector('pizzaorder');
const selectPizza = createFeatureSelector('pizza');
const selectDelivery = createFeatureSelector('delivery');
const selectUserName = createSelector(
selectUser,
@nogtini
nogtini / PizzaOrder.component.ts
Created April 18, 2018 17:55
PizzaOrder component connecting to Interactors and Selectors
import {PizzaOrderSelectors} from '@themes/PizzaOrder/PizzaOrder.selectors';
import {PizzaOrderInteractors} from '@themes/PizzaOrder/PizzaOrder.interactors';
ngOnInit() {
this.userName$ = this.store.select(PizzaOrderSelectors.selectUserName);
this.pizzaTopping$ = this.store.select(PizzaOrderSelectors.selectPizzaToppings);
this.pizzaCrustType$ = this.store.select(PizzaOrderSelectors.selectPizzaCrustType);
this.deliveryEstimate$ = this.store.select(PizzaOrderSelectors.selectDeliveryEstimate);
this.driverName$ = this.store.select(PizzaOrderSelectors.selectDriverName);
this.driverCarType$ = this.store.select(PizzaOrderSelectors.selectDriverCarType);
@nogtini
nogtini / transclusion.txt
Created April 27, 2018 15:56
Transclusion
Look at me I'm transcluded!
@nogtini
nogtini / css.ipynb
Created November 27, 2018 03:15 — forked from nealcaren/css.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nogtini
nogtini / inset_input.css
Created May 13, 2019 13:42 — forked from nrrrdcore/inset_input.css
The Perfect Inset Input CSS
input {
height: 34px;
width: 100%;
border-radius: 3px;
border: 1px solid transparent;
border-top: none;
border-bottom: 1px solid #DDD;
box-shadow: inset 0 1px 2px rgba(0,0,0,.39), 0 -1px 1px #FFF, 0 1px 0 #FFF;
}
@nogtini
nogtini / carl_hewitt_actor_model.md
Last active June 15, 2019 01:48 — forked from rbishop/carl_hewitt_actor_model.md
Notes from Carl Hewitt on the Actor Model
@nogtini
nogtini / dci_alt.rb
Created June 24, 2019 15:21 — forked from elight/dci_alt.rb
DCI with delegation instead of extension
class User < ActiveRecord::Base
# ... lots of persistence stuff
end
class GitHubUserProvisioner < SimpleDelegator
def provision_with!(user_info, extra_user_hash)
self.github_login = extra_user_hash['login']
self.name = user_info['name']
self.email = user_info['email']
self.github_url = user_info['urls']['GitHub']
@nogtini
nogtini / capybara cheat sheet
Created July 2, 2019 22:16 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')