Skip to content

Instantly share code, notes, and snippets.

@mjrode
mjrode / divider.jsx
Last active January 19, 2020 16:36
Styled MaterialUI divider
import React from 'react';
import Divider from '@material-ui/core/Divider';
import styled from 'styled-components';
const StyledDivider = styled(Divider)`
color: white
`
export default function App( ) {
ImportData
GET /plex/import/sections
Request URL https://plex.mjrflix.com/library/sections?X-Plex-Token=testPlexApiToken
import sec response undefined
Sections response []
1) should find and store sections in the database
@mjrode
mjrode / Node test
Last active February 27, 2019 19:39
import chai from 'chai';
import nock from 'nock';
import app from '../../../../index';
import importData from '../../../../server/services/plex/importData';
import models from '../../../../server/db/models';
import { seed, truncate } from '../../../../server/db/scripts';
import * as nocks from '../../../nocks';
// // before(() => truncate('PlexSection'));
describe('ImportData', () => {
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
04d53e3e487c7467d0ec3bfefa21963952d52e6c7c53a6f76b93b497b6049fb3ef5e6bfb514cf66fe6e0dbfc366b0e5879435be702eb319556de9bfabea0caf623;mythic-forge-test

The Complete Guide to Nested Forms in Phoenix

I recently spent some time dealing with nested forms in Phoenix. Nested forms are great when you want to create multiple database records in a single transaction and associate them with each other. I am new to Phoenix and really struggled to find any resources that helped me with my specific problem. I decided to document what I learned in the process in hopes of helping others that are new to Elixir and Phoenix.

Here is my attempt at a one stop shop to learn everything you will need to know about nested forms. If you would like to view the GitHub repo you can check it out here.

Thanks to Heartbeat and Jose for excellent blog posts on nested forms. Also shoutout to Josh for showing me some examples at Ruby

@mjrode
mjrode / 0_reuse_code.js
Created March 16, 2016 21:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console