Skip to content

Instantly share code, notes, and snippets.

View nathaniel-miller's full-sized avatar

Nathaniel Miller nathaniel-miller

View GitHub Profile
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@nathaniel-miller
nathaniel-miller / linting.md
Created July 7, 2019 03:17
VSCode, ESLint, Prettier, Husky Setup

This is a giant pain in the ass to get working correctly and consistently. Even when it does work, often trying to replicate it in another repository or workspace the setting's don't always seem to work.

I can at times entirely remove my .eslintrcand vscode will still go on its merry way, linting from some mysterious ghost rules. On other occasions things will be great and then, after restarting vscode, I'll be told my imports are invalid (they are not).

As a matter of fact, as I sat down to write this I couldn't get it to linting/format according to my rules. Eventually I reinstalled my node packages with npm install and tried to commit a poorly formatted file (which thankfully failed). That seemed to finally kick something (not sure what) in the pants and linting began to function correctly. But literally, I've spent days getting this sorted out.

Anyway, here's my current setup.

VSCODE SETTINGS

In either ~/.config/Code/User/settings.json or myworkspace.code-workspace:

Hey Milo,

Thanks for tackling this set of issues and for doing good work. Being able to deligate work and have it come back is a good feeling :)

I've read the code and pulled the graphql_additions branch in order to run the queries. This is a good first draft but there are a few tweaks that need to be made.

I'll format this as a numbered checklist so that when discussing a particular point it can easily be referenced / fixed.

Style & Convention Thoughts

@nathaniel-miller
nathaniel-miller / caren_entity_guide.md
Last active June 21, 2018 03:31
Entity generators, migrations, and associations for initial caren webapp

Caren Entities

User

This is the entity that represents the individual who has the ability to 'login' using a device.

Generator

The scaffolding for this entity is currently being generated by the Devise gem.

rails g devise:install
@nathaniel-miller
nathaniel-miller / intersection.js
Created September 12, 2017 02:58
Lifion Array Intersection
function intersection(a, b) {
a = quickSort(a);
b = quickSort(b);
let results = [];
for(let i = 0; i < a.length; i++) {
let current = a[i];
let triedThis;
if(current == a[i - 1]) {
@nathaniel-miller
nathaniel-miller / capsSplitter.js
Created September 12, 2017 02:57
Lifion Caps Splitter
function capsSplitter(string) {
let words = [];
let word = string[0];
for(let i = 1; i < string.length; i++) {
let currentChar = string[i];
let CapitalChar = string[i].toUpperCase();
if(currentChar == CapitalChar) {
words.push(word);
String file contents
String file contents
String file contents
@nathaniel-miller
nathaniel-miller / file1.txt
Created September 20, 2016 18:59
Some Description goes here.
String file contents