Skip to content

Instantly share code, notes, and snippets.

@jcharles22
jcharles22 / gist:5658201a3abdd9a34029901de2938881
Last active June 7, 2019 04:10
Add meta data in head to get picture to display on Linkedin
<meta prefix="og: http://ogp.me/ns#" property="og:title" content="{Your content}" />
<meta prefix="og: http://ogp.me/ns#" property="og:type" content="{Your content}" />
<meta prefix="og: http://ogp.me/ns#" property="og:description" content="{Your content}" />
<meta prefix="og: http://ogp.me/ns#" property="og:image" content="{Your content}" />
<meta prefix="og: http://ogp.me/ns#" property="og:url" content="{Your content}" />
drop table if exists bookmarks;
CREATE table bookmarks (
id primary key ,
title text not null,
rating INTEGER not null,
description text not null,
url text not null,
imgUrl text,
require('dotenv').config();
const knex = require('knex');
const knexInstance = knex({
client: 'pg',
connection: process.env.DB_URL
})
function searchName(searchTerm) {
@jcharles22
jcharles22 / shopping-list-service
Created June 13, 2019 21:28
Building services asignment
const ShoppingListService = {
getAllItems(knex) {
return knex
.select('*')
.from('shopping_list')
},
getById(knex, id) {
return knex
.from('shopping_list')
.select('*')
@jcharles22
jcharles22 / gist:ece4bbfcb47e7cd92d8df3bed720ab04
Created June 20, 2019 03:28
Relationships and schema design assignment
--asignment 1
select
e.emp_name,
d.dept_name
from
employee e
join
department d
on
e.department = d.id
Should the client or the server take more security precautions?
Server
What's the difference between local storage and session storage?
session storage gets cleared when the page session ends.
What problem does a JWT expiry time solve?
that JWTs are valid forever
Is a refresh endpoint protected or public?
A drinking game where the user's asked how many player and names then gets a random card from the database with
what the players have to do and just flip through the cards till a set of cards have been flipped through and
ask if they want to play again.
a user can login to add cards to the database and see all cards that are in there
also they can pick and choose which cards they want to play with.
@jcharles22
jcharles22 / gist:cf94f4751a92f6ae55da71c015cabb94
Created July 2, 2019 02:26
fullstack capstone user stories
New User | Play the game without signing in | High
New User | set number of players | High
New User | give players nickname | High
New User | register account | High
Returning User | Login | High
Returning User | Add Cards to the Database | Medium
Returning User | Remove cards that only this user added | Low
Returning User | toggle cards to be play with | Low
Returning User | Login/logout | High
Returning User | Notification of all the new cards added to the database since last login |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Flip and Sip
check it out here:
https://flip-and-sip.jaredcharles.now.sh/
repo:
https://github.com/jcharles22/flip-and-sip/tree/mvp
feedback:
Catherine, my wife, said the cards need to be styled differnetly when the phone is in landscape mode, wants to be able
to singup, and see who made what cards,