Skip to content

Instantly share code, notes, and snippets.

@MikeFielden
MikeFielden / cy_example.js
Last active January 25, 2022 08:37
Cypress.io example spec
//
// **** Kitchen Sink Tests ****
//
// This app was developed to demonstrate
// how to write tests in Cypress utilizing
// all of the available commands
//
// Feel free to modify this spec in your
// own application as a jumping off point
function Api() {}
Api.prototype.fetchUsers = async function () {
const users = await getUsersFromApi();
return users;
};
Api.prototype.fetchProfileImg = async function (user) {
const profileImg = await getProfileImgFromUser(user);
return profileImg;
@MikeFielden
MikeFielden / entity_colors.md
Last active October 2, 2018 19:54
Entity colors and icons

EntityTypes colors

Material color palette — COSMIC

Cosmic Web Colors

EntityType primary accent icon
Artifacts #81c784 #81c784 #388E3C #388E3C fal fa-file-alt
Activities #4dd0e1 #4dd0e1 #0097a7 #0097a7 fal fa-stopwatch
Vehicles #FFD54F #FFD54F #FFA000 #FFA000 fal fa-rocket
@MikeFielden
MikeFielden / index.js
Last active October 9, 2015 12:45
Enum-like structure in es2015
const shapeType = {
triangle: new Symbol()
};
// Demo func
function getArea(shape, options) {
var area = 0;
switch (shape) {
case shapeType.triangle:
@MikeFielden
MikeFielden / index.html
Created July 12, 2012 17:44
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>"Holy Grail" layout with flex box Chrome 22 recommended &middot; CodePen</title>
<!--
Copyright (c) 2012 Mike Fielden, http://codepen.io/MikeFielden
Permission is hereby granted, free of charge, to any person obtaining
@MikeFielden
MikeFielden / index.html
Created July 11, 2012 17:27
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>"Holy Grail" layout with flexbox &middot; CodePen</title>
<!--
Copyright (c) 2012 Mike Fielden, http://codepen.io/MikeFielden
Permission is hereby granted, free of charge, to any person obtaining
/* New Todo */
.container {
box-sizing: border-box;
width: 510px;
}
/* input container */
.container > section {
position: relative;
}
@MikeFielden
MikeFielden / dabblet.css
Created June 22, 2012 21:11
Movie opening
/* Movie opening */
body { background: black; padding: 100px; margin: 0; }
h1 {
position: relative;
text-align: center;
color: white;
text-transform: uppercase;
@MikeFielden
MikeFielden / dabblet.css
Created June 22, 2012 20:34 — forked from LeaVerou/dabblet.css
Scrolling shadows by @kizmarh and @LeaVerou
/**
* Scrolling shadows by @kizmarh and @leaverou
* Only works in browsers supporting background-attachment: local; & CSS gradients
* Degrades gracefully
*/
html {
background: white;
font: 120% sans-serif;
}
/**
* Inset text
*/
body {
padding-top: 100px;
background-color: #8d9794;
}
h1 {