This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin you@yourdomain.com | |
ServerName yourdomain.com | |
ServerAlias www.yourdomain.com | |
DocumentRoot /path/to/yourdomain | |
Redirect / https://yourdomain.com/ | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerAdmin you@yourdomain.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$string = preg_replace( | |
'/(?<=^|\s)@([a-z0-9_]+)/i', | |
'<a href="https://twitter.com/$1">@$1</a>', | |
$string | |
); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Can’t Hug Every Cat</title> | |
<style> | |
body { | |
font: 1em/1.5 Cambria, Georgia, serif; | |
margin: 0 5%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Media Query Multiple Columns</title> | |
<meta name="viewport" content="width=device-width, intial-scale=1"> | |
<style> | |
@media all and (min-width: 40em) and (min-height: 36em) { | |
[role="main"] { | |
-webkit-column-count: 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[data-component-term="trends"] *, | |
[data-component-term="user_recommendations"] * { | |
display: none !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
</head> | |
<body> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="post" action="/webmention"> | |
<p>Have you published a response to this? | |
<label for="webmention-source">Let me know the <abbr title="Uniform Resource Locator">URL</abbr></label>: | |
</p> | |
<input type="url" name="source" id="webmention-source"> | |
<input type="hidden" name="target" value="https://adactio.com/journal/6495/"> | |
<input type="submit" value="Ping!"> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Show a progress element for any form submission via POST. | |
Prevent the form element from being submitted twice. | |
*/ | |
(function (win, doc) { | |
'use strict'; | |
if (!doc.querySelectorAll || !win.addEventListener) { | |
// doesn't cut the mustard. | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (win, doc) { | |
win.addEventListener('beforeinstallprompt', function (e) { | |
e.preventDefault(); | |
var deferredPrompt = e; | |
var insertionPoint = doc.querySelector('main .contents'); | |
insertionPoint.insertAdjacentHTML('afterbegin',` | |
<div class="feedback" role="dialog" aria-labelledby="homescreen"> | |
<h2 id="homescreen">Install The Session</h2> | |
<p>Would you like to add The Session to your home screen?</p> | |
<button class="back">No, thanks</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Test</title> | |
<style> | |
.slogan span:nth-child(odd) { | |
color: red; | |
} | |
</style> | |
</head> |