Skip to content

Instantly share code, notes, and snippets.

View 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 Oct 26, 2021
Example Markdown
View example.md

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 Sep 16, 2021
Example HTML for when you need it
View base.html
<h1 id="testtheme">Test Theme</h1>
<hr />
<div class="pill">headers</div>
<h1 id="header1">Header 1</h1>
<h2 id="header2">Header 2</h2>
View index.html
<!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 Dec 8, 2020
Testing out simple probability stuff
View random-playground.js
// 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
View prettier.config.js
module.exports = {
semi: false,
tabWidth: 2,
singleQuote: true,
printWidth: 120,
trailingComma: 'es5',
parser: 'babylon',
files: ['*.html', '*.css', '*.js', '*.jsx', '*.md'],
}
@brandonstephens
brandonstephens / Phone Number or Bust
Last active Feb 16, 2016
Phone Number or Empty Validation Patter for Advanced Custom Fields: Validated Field - Choose PHP Statement
View Phone Number or Bust
<?php
if ( preg_match('/^\d{3,3}-\d{3,3}-\d{4,4}$/', $value) || strlen($value) == 0 ) {
return true;
} else {
return false;
}
?>
View Symlink Sublime
View wufoo.php
<!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">
View Jekyll Breadcrumb
{% 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 %}