Skip to content

Instantly share code, notes, and snippets.

@pariosa
pariosa / gist:67bfd12ae6ebb1325fb6d13e5a598da0
Last active August 1, 2022 18:46
terminal background for iterm2
https://i.imgur.com/ZVs4XZe.png
https://i.imgur.com/kb8usFU.png
@pariosa
pariosa / VendorAppDescription.md
Last active June 22, 2022 19:10
Vendor App Overview

App Overview

A storefront app.

  • Capable of allowing admins to login, create and edit categories of items and items, view and edit orders and payments.

  • Capable of allowing guests to browse categories and items, and register or login

  • Capable of allowing users to put items in cart, browse items and categories of items, and checkout (creating order and payment from cart)

Front End

angular 2 (javascript)

@pariosa
pariosa / WrapperComponent.tsx
Last active April 23, 2021 00:54
React Typescript Component for adjustable-margin wrapper div
import styled from 'styled-components';
interface wrapperProps {
top?: string;
bottom?: string;
left?: string;
right?: string;
as?: string;
children: React.ReactElement;
}
const defaultProps: wrapperProps = {
@pariosa
pariosa / Container.js
Last active March 24, 2021 03:52
react table that manually assigns key-value pairs input as a json object in props to a two column table, allows disabling and show/hiding specific columns
import React from "react";
import TableGenerator from './TableGenerator';
function Container(props){
const testData = [
{
"Goal Name":"sitewide",
"Device":"Android",
"IP Address":"176.65.85.xx",
call pathogen#infect()
syntax on
colorscheme seattle
filetype indent plugin on
import React, { Component } from 'react';
import { SelectBox, CheckBox, TextBox, DateBox, Button, ValidationSummary } from 'devextreme-react';
import {
Validator,
RequiredRule,
CompareRule,
EmailRule,
PatternRule,
StringLengthRule,
RangeRule,
import React from 'react';
import { shallow } from 'enzyme';
import EditUserForm from './EditUserForm';
import '../../jest.setup'
const editUserForm = shallow(<EditUserForm />);
describe('EditUserForm', ()=>{
import React from 'react';
import { shallow } from 'enzyme';
import CreateUserForm from './CreateUserForm';
import '../../jest.setup'
const createUserForm = shallow(<CreateUserForm />);
describe('CreateUserForm', ()=>{
it("renders correctly", () => {
import React, { Component } from 'react';
import { SelectBox, CheckBox, TextBox, DateBox, Button, ValidationSummary } from 'devextreme-react';
import {
Validator,
RequiredRule,
CompareRule,
EmailRule,
PatternRule,
StringLengthRule,
RangeRule,
@pariosa
pariosa / gist:4ee982d949d711f787b91f010e0ec797
Last active May 20, 2020 04:14
Node Lambda - execute validation query to see if user exists, if not, add that user
const mysql = require('mysql');
const config = {
host: "blahblah.amazonaws.com",
user: "default",
password: "default",
database: "whoknows",
port:"3306"
}
const db = mysql.createConnection(config);
app.post('/users', async function (req, res) {