Skip to content

Instantly share code, notes, and snippets.

View Franci5co5aoco's full-sized avatar

Franci5co Franci5co5aoco

View GitHub Profile
@Franci5co5aoco
Franci5co5aoco / curl.md
Last active March 6, 2019 09:45 — 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.

@Franci5co5aoco
Franci5co5aoco / spa_embed_on_website.md
Last active February 28, 2019 16:09
Embed SPAs (React or Angular) on a Website’s div

Embed SPAs (React or Angular) on a Website’s div

Embed React app in a Website

On react project:

my-react-app/package.json add base href folder

{
  "name": "my-react-app",
  "version": "0.1.0",
  "homepage": "myReactApp/", // <= Add the path name where you'll place the react app in your site
@Franci5co5aoco
Franci5co5aoco / README.md
Created February 11, 2019 12:36 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe