Skip to content

Instantly share code, notes, and snippets.

View bradleytaunt's full-sized avatar

Bradley Taunt bradleytaunt

View GitHub Profile
@bradleytaunt
bradleytaunt / typesafe.css
Last active May 22, 2022 13:42
TypeSafe CSS
*{box-sizing:border-box;}body{font:16px/1.5 "Georgia",serif;margin:0 auto;max-width:66ch;padding:1rem;}h1,h2,h3,h4,h5,h6{font-family:"Helvetica Neue","Helvetica","Arial",sans-serif;margin:2.5rem 0 1rem;}ul li, ol li{margin-top:0.5rem;}a,a:visited{color:black;}a:hover{color:dodgerblue;}img{height:auto;max-width:100%;}pre{border: 1px solid lightgrey;overflow:auto;}code{color:orangered;display:inline-block;}pre code{padding:1rem;}blockquote{border-left:5px solid lightgrey;font-size:120%;font-style:italic;margin:2rem 0;padding:1rem;}table{border-collapse:collapse;margin:2rem 0;text-align:left;width:100%;}tr{border-bottom:1px solid lightgrey;}th,td{padding:0.5rem;}hr{background:lightgrey;border:0;height:1px;margin:2rem 0;}
@patotoma
patotoma / ContactForm.md
Last active October 7, 2023 07:39
secure php contact form

Secured PHP Contact Form

<?php
  if(isset($_POST['submit'])){
    $name = htmlspecialchars(stripslashes(trim($_POST['name'])));
    $subject = htmlspecialchars(stripslashes(trim($_POST['subject'])));
    $email = htmlspecialchars(stripslashes(trim($_POST['email'])));
    $message = htmlspecialchars(stripslashes(trim($_POST['message'])));
    if(!preg_match("/^[A-Za-z .'-]+$/", $name)){
@iamstarkov
iamstarkov / gist:2795239
Created May 26, 2012 20:43
Tumblr full list of post types
{block:Text} {/block:Text}
{block:Photo} {/block:Photo}
{block:Photoset} {/block:Photoset}
{block:Quote} {/block:Quote}
{block:Link} {/block:Link}
{block:Chat} {/block:Chat}
{block:Audio} {/block:Audio}
{block:Video} {/block:Video}
{block:Answer} {/block:Answer}