Skip to content

Instantly share code, notes, and snippets.

View lazysod's full-sized avatar

Barry Smith lazysod

View GitHub Profile
@lazysod
lazysod / social-buttons.html
Last active June 1, 2021 22:15
CSS social media share buttons
<style>
.btnz {
display: block;
float: left;
padding: 10px 15px;
border:none;
background-color: #ececec;
text-decoration: none;
font-size: 18px;
color: #FFF;
@lazysod
lazysod / pwreset.php
Created November 3, 2014 11:07
If a user has been locked out then the following code can be used to reset an admin password in #Processwire
<?php
// place this in any part of a page template to reset password
$admin = $users->get('ADMIN_NAME');
$admin->setOutputFormatting(false);
$admin->pass = 'PASSWORD HERE'; // put in your new password
$admin->save();
?>
@lazysod
lazysod / canonical.php
Created May 22, 2014 10:29
Generate a canonical URL using PHP
<link rel="canonical" href="http://www.website.com<?php echo parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH);?>">