Skip to content

Instantly share code, notes, and snippets.

@brandonstephens
brandonstephens / Markdown Cheatsheet
Created November 30, 2021 18:34
markdown-cheatsheet
# Markdown Cheatsheet
```
The purpose of markdown is to write text without extra, software specific formatting.
Be sure to leave an extra line returns between paragraphs.
```
The purpose of markdown is to write text without extra, software specific formatting.
@brandonstephens
brandonstephens / example.md
Last active October 26, 2021 15:56
Example Markdown

Header Level 1

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nobis fugiat, accusamus aut tempora nam maiores totam. Dolorum unde, ipsum consectetur quas quia officiis, dolore, cum molestias magnam nobis voluptatem sequi?

echo 'foobar';
@brandonstephens
brandonstephens / base.html
Created September 16, 2021 18:16
Example HTML for when you need it
<h1 id="testtheme">Test Theme</h1>
<hr />
<div class="pill">headers</div>
<h1 id="header1">Header 1</h1>
<h2 id="header2">Header 2</h2>
@brandonstephens
brandonstephens / index.html
Created January 20, 2021 00:37
Scratch Pad
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>📝 Scatch Pad</title>
<!-- https://tailwindcss.com -->
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
@brandonstephens
brandonstephens / random-playground.js
Created December 8, 2020 21:21
Testing out simple probability stuff
// Playground for testing simple probability
// more cycles more consistent the output
let cycles = 1000;
// how often do you want value to return true
// 0 === never, 1 === always
let truthAmount = 0.7;
// run the test
@brandonstephens
brandonstephens / prettier.config.js
Created January 27, 2020 15:01
Prettier Config
module.exports = {
semi: false,
tabWidth: 2,
singleQuote: true,
printWidth: 120,
trailingComma: 'es5',
parser: 'babylon',
files: ['*.html', '*.css', '*.js', '*.jsx', '*.md'],
}
{% assign url_split = page.url | replace_first: "/" | split:"/" %}
{% assign url_size = url_split.size %}
<ol class="breadcrumb">
{% if url_size < 1 %}
<li class="active">Home</li>
{% else %}
<li><a href="/">Home</a></li>
{% endif %}
@brandonstephens
brandonstephens / Symlink Sublime
Last active February 16, 2016 17:40
Symlink Sublime
@brandonstephens
brandonstephens / Phone Number or Bust
Last active February 16, 2016 17:40
Phone Number or Empty Validation Patter for Advanced Custom Fields: Validated Field - Choose PHP Statement
<?php
if ( preg_match('/^\d{3,3}-\d{3,3}-\d{4,4}$/', $value) || strlen($value) == 0 ) {
return true;
} else {
return false;
}
?>
@brandonstephens
brandonstephens / wufoo.php
Created January 27, 2016 14:49
MAMP + Wufoo API
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Wufoo Demo</title>
<!-- Latest compiled and minified CSS from Bootstrap so the page don't look like ass -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
<body>
<div class="container">