Skip to content

Instantly share code, notes, and snippets.

@piferdg
piferdg / curl.md
Created March 28, 2019 18:27 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@piferdg
piferdg / Installing Cypress.md
Last active October 5, 2018 16:55
Installing Cypress

Cypress

Install cypress: $npm install cypress
install cypress files within project, and run tests: $npx cypress open

Note: Make your test file within cypress > integration

@piferdg
piferdg / Creating a React App.md
Last active October 5, 2018 16:54
Creating a React App

Only do these steps once, this is an initial setup. Do this from the root directory
$npm install --save react
$npm install --save react-dom
$npm install create-react-app -g

Do this within the file you're currently using (each app)
$create-react-app (whatever app name you want to use)
$cd (app name)
$npm start

@piferdg
piferdg / Deploying a React app to firebase.md
Last active December 12, 2018 00:58
Deploying a React app to firebase
  • Log into firebase and create a project
  • Make sure npm isn’t running anything any place in any terminal
  • Change to your react app folder
  • $npm run build
    -creates a build folder and merges files into a compact build version
  • $firebase init
  • select hosting
  • select your project
  • type build as your public directory <--- This is SUPER important
  • configure as single page app - NO
@piferdg
piferdg / Last .gitignore you'll ever need.txt
Last active October 8, 2018 23:35
Last .gitignore you'll ever need
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
@piferdg
piferdg / Building a server.md
Last active October 5, 2018 16:46
Building a server

Build a server

if you drop this into a markdown, it will be a checkbox checklist

  • mkdir server_directory (inside project folder, same level / adjacent to client directory)
  • cd server_directory
  • npm init -y
  • update start script, 'start':'node app.js'
  • npm install express pg cors body-parser (other dependencies etc.)
  • createdb name_of_database
@piferdg
piferdg / Advanced Git.md
Last active October 5, 2018 16:52
Advanced Git

Advanced Git

The goal of this drill is to create a poem using a more advanced git workflow.

  • In your group, one person should create a git repository.

  • The rest of the members of your group should clone it onto their machine.

  • One person will create an index.html document with the basic parts of an html document in it.

  • Push that document up to the repo. Don't forget about remotes.

  • Everyone will pull that change down to their local repo.

@piferdg
piferdg / Deploying knex and express to heroku.md
Last active October 5, 2018 16:53
Deploying knex/express to heroku

Deploying Knex databases to heroku/help for drills:

  • Git init
  • Create repo in git hub and use the second set of command line code(git add remote origin stuff)
  • Create a git ignore
  • Git add, git commit"first commit", git push -u origin master
  • Npm intstall
  • Npm intstall knex
  • Npm install pg
  • Createdb (create a database and name it after the createdb command)
@piferdg
piferdg / Github Flavored Markdown.md
Created June 4, 2018 23:59 — forked from stevenyap/Github Flavored Markdown.md
Github Flavored Markdown cheatsheet

Github Flavored Markdown (GFMD) is based on Markdown Syntax Guide with some overwriting as described at Github Flavored Markdown

Text Writing

It is easy to write in GFMD. Just write simply like text and use the below simple "tagging" to mark the text and you are good to go!

To specify a paragraph, leave 2 spaces at the end of the line

Headings