Create a simple pub/sub system using webhooks. It will require you to create two servers, a publisher and a subscriber.
Publisher Server Requirements
- publish a payload to topic
- subscribe to a topic to receive payloads
POST /publish/{topic}
const breakpoints = ["480px", "700px", "1025px", "1280px"]; | |
// TODO should this be `small` medium and large | |
breakpoints.sm = breakpoints[0]; | |
breakpoints.med = breakpoints[1]; | |
breakpoints.lg = breakpoints[2]; | |
const colors = { | |
primary: "#0c40fc", | |
blue: "#0c40fc", |
import React from "react"; | |
import styled from "styled-components"; | |
import { color, typography, space } from "styled-system"; | |
const Heading = styled.h1` | |
${typography} | |
${space} | |
${color} | |
`; |
<!DOCTYPE html> | |
<html > | |
<head> | |
<meta charset="UTF-8"> | |
<title>Horizons AJAX Async Example</title> | |
</head> | |
<body> | |
<h1>AJAX Async Example</h1> |
// prettier-ignore | |
const PRODUCTS_URL = "https://horizons-school-of-technology.github.io/week02/day4/examples/products.json"; | |
function getAllProductDetails(productUrls, callback) { | |
let products = []; | |
for (let i = 0; i < productUrls.length; i++) { | |
let url = productUrls[i].url; | |
$.ajax(url, { | |
success: function(productDetail) { |
.title { | |
font-family: arial; | |
font-size: 46px; | |
font-weight: normal; | |
} | |
body { | |
background-color: #f7f8f9; | |
padding: 30px; | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Horizon's first webpage</title> | |
</head> | |
<body style="background-color: #f7f8f9; padding: 30px"> | |
<div style="background-color: white; padding: 30px 50px; border: 1px solid #cbcbcb;"> | |
<h1 style="font-family: arial; font-size: 46px; font-weight:normal;"> | |
Let's learn HTML |
# Convert all .flac files within this folder to .wav files | |
find . -iname "*.flac" | wc | |
for flacfile in `find . -iname "*.flac"` | |
do | |
ffmpeg -i $flacfile "${flacfile%.*}.wav" | |
done |