Skip to content

Instantly share code, notes, and snippets.

View matt-d-brown's full-sized avatar

Matt Daniel Brown matt-d-brown

View GitHub Profile
fetch('https://api.github.com/orgs/nodejs')
.then(response => response.json())
.then(data => {
console.log(data) // Prints result from `response.json()` in getRequest
})
.catch(error => console.error(error))
@matt-d-brown
matt-d-brown / expecting.md
Created August 3, 2019 07:36 — forked from sahilsk/expecting.md
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect
<h1>CSS Basic Elements</h1>
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p>
<hr />
<h1 id="headings">Headings</h1>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
@matt-d-brown
matt-d-brown / OctoNote-test.md
Created December 14, 2018 01:06
Testing OctoNote iOS app

Title

Subtitle

Blah Blah block quote

# Comments 
echo "$someVariable"
@matt-d-brown
matt-d-brown / index.html
Created September 15, 2018 22:28
On/Off Toggle
<label class="power">
<input type="checkbox">
<div>
<svg viewBox="0 0 44 44">
<path d="M22,6 C31,6 38,13 38,22 C38,31 31,38 22,38 C13,38 6,31 6,22 C6,13 13,6 22,6 L22,28" id="path"></path>
</svg>
</div>
</label>
<!-- dribbble -->
<!doctype html> <head> <meta charset=UTF-8> <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"> <meta name=viewport content="width=device-width,initial-scale=1"> <title>title</title> <style>body{background:#000}.container{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:200px;height:200px}.outerring{position:relative;width:100%;height:100%;border-radius:100%;border:5px solid #38fbfd}.outerring .innerring{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:calc(98%);height:calc(97%);border-radius:100%;border:5px solid #2255cb;animation:breathe 4s linear infinite}@keyframes breathe{0%{box-shadow:0}25%{box-shadow:inset 0 0 20px 5px #2255cb}50%{box-shadow:inset 0 0 120px 5px #2255cb}75%{box-shadow:inset 0 0 20px 5px #2255cb}100%{box-shadow:0}}</style> </head> <body> <div class=container> <div class=outerring> <div class=innerring></div> </div> </div> <script src=//cdnjs.cloudflare.com/ajax/libs/modernizr/2.5.3/modernizr.min.js></script> <script>function autorun(){
@matt-d-brown
matt-d-brown / 3d-clock.markdown
Last active September 15, 2018 22:18
3D Clock
@matt-d-brown
matt-d-brown / index.pug
Created September 10, 2018 22:10
Press button animation
.button
@matt-d-brown
matt-d-brown / css-sliding-multi-level-accordion.markdown
Created September 10, 2018 22:07
CSS sliding multi-level accordion
@matt-d-brown
matt-d-brown / card-built-with-styled-components.markdown
Created September 10, 2018 22:06
Card built with styled-components