Skip to content

Instantly share code, notes, and snippets.

View jwkuchta's full-sized avatar
🏠
Working from home

Justyna Kuchta jwkuchta

🏠
Working from home
View GitHub Profile
const _ = require('lodash')
const { Path } = require('path-parser')
const { URL } = require('url') // methods to parse url, we will use URL
const mongoose = require('mongoose')
const requireLogin = require('../middlewares/requireLogin')
const requireCredits = require('../middlewares/requireCredits')
const Mailer = require('../services/Mailer')
const surveyTemplate = require('../services/emailTemplates/surveyTemplate')
const Survey = mongoose.model('surveys')
const sgMail = require("@sendgrid/mail");
const keys = require("../config/keys");
class Mailer {
constructor({ subject, recipients }, content) {
sgMail.setApiKey(keys.sendGridKey);
this.msg = {
to: recipients.map(({ email }) => email),
from: "no-reply@emaily.com",
subject: subject,
addPhotoToUser = (user, data) => {
fetch(`${apiBaseUrl}/api/v1/users/${user.id}`, {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${localStorage.jwt}`,
},
body: data
})
.then(resp => resp.text())
.then(data => window.location.href = "/profile")
import { useState } from "react";
import styled from "@emotion/styled";
import axios from "axios";
import Row from "./prebuilt/Row";
import BillingDetailsFields from "./prebuilt/BillingDetailsFields";
import SubmitButton from "./prebuilt/SubmitButton";
import CheckoutError from "./prebuilt/CheckoutError";
import { CardElement } from '@stripe/react-stripe-js'
import React from 'react'
import Radium from 'radium'
const Puppy = ( props ) => {
const style = {
'@media (min-width: 500px)': {
width: '450px'
}
}
import React, { Component } from 'react'
import Radium, { StyleRoot } from 'radium'
import Person from './Puppy'
class App extends Component {
state = {
puppies: [
{ id: 1, name: 'Rover', age: 8 },
{ id: 2, name: 'Fifi', age: 3 },
{ id: 3, name: 'Slagathor', age: 1 }

Justyna Kuchta

Front-End Developer, Atlanta, GA

Front-end developer experienced in JavaScript-based programming​ with a background in foreign language instruction and translation and a proven ability to adapt and collaborate in rapidly changing work environments and team compositions as well as work independently. Worked through 1000+ hours of Bootcamp where I learned JavaScript and Ruby on Rails while consistently assisting my classmates to debug and refactor their code. During that time, I built five web applications including one with React/Redux. Supplemented this bootcamp with self-taught knowledge and experience in Angular, Data Structures and Algorithms, and most recently Jest and Cypress testing. Cre

describe('Form', () => {
beforeEach(() => {
cy.visit('/')
})
// 1. We have an HTML element of type form with a class 'city-country'.
it('it has a country-city form', () => {
cy.get('form').should('have.class', 'country-city')
})
import React, { useState } from "react"
import { connect } from 'react-redux'
import { getWeatherData } from '../redux/actions.js'
import Button from 'react-bootstrap/Button'
const Form = ({ getWeatherData, setFetchingTrue, clearWeatherData }) => {
let error = 'City and Country cannot be left blank'
const [ city, setCity ] = useState('')
function binaryPatternMatching4(pattern, string) {
string = string.replace(
/[aeiouy]/gi, '0'
).replace(
/[bcdfghjklmnpqrstvwxz]/gi, '1'
)
let matches = 0
let stop = string.length - pattern.length
for (let i = 0; i <= stop; i++) {
let substring = string.substr(i, pattern.length)