Skip to content

Instantly share code, notes, and snippets.

View primitiveshaun's full-sized avatar

Shaun Knowles primitiveshaun

View GitHub Profile
@primitiveshaun
primitiveshaun / pd_spare_styles.scss
Created October 16, 2020 14:34
Primitive Theme: Removed Styles
/* Design Page */
h1 {
//${h1Style(colors)}
font-family: 'Abril Fatface', Georgia, cursive;
font-size: 4.3rem;
//color: ${hexToRGB(colors.coal, 0.9)};
//text-shadow: -8px 1px 2px ${hexToRGB(colors.disco.cyan, 0.4)}, 8px -1px 2px ${hexToRGB(colors.disco.magenta, 0.4)};
@primitiveshaun
primitiveshaun / htaccess-rules.sh
Last active March 14, 2021 13:28
Apache - .htaccess Reference
# htaccess-rules.sh
# *** HOUSEKEEPING! Now that's how an Apache handles config... ***
# Master File: Maintained by Primitive Digital's Housekeeping Department
# https://primitivedigital.uk/housekeeping-department/
# STATUS ::: DRAFT: Requires Review
# N.B. You only need "RewriteEngine On" once in the .htaccess, before any RewriteCond and RewriteRule lines.
# N.B. If rules are duplicated the one that appears last has dominance.
# WordPress
@primitiveshaun
primitiveshaun / css-reset.css
Created May 15, 2024 09:35
Modern and Minimal CSS Reset
/* Modern and Minimal CSS Reset */
/* Remove default margins and paddings */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Set base font properties */
<?php
/*
Establish a connection using mysqli and checked for connection errors.
Use htmlspecialchars to escape output to prevent XSS attacks.
Updated SQL query to prevent SQL injection, though parameterised queries via prepared statements would be better.
Error Handling: Added error handling for the database connection and query execution.
Added error handling for file operations.
Code Structure: Improved readability by formatting the XML string more consistently.
Organized the code to separate database logic, XML generation, and file handling.
@primitiveshaun
primitiveshaun / bootstrap-5-sass-mixins-cheat-sheet.scss
Created March 4, 2025 09:39 — forked from anschaef/bootstrap-5-sass-mixins-cheat-sheet.scss
All New Bootstrap 5 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 5 Sass Mixins [ Cheat sheet ]
// Updated to Bootstrap v5.1.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/main/scss/mixins
// @see https://github.com/twbs/bootstrap/blob/main/scss/_variables.scss
/* -------------------------------------------------------------------------- */
// Options
// @see https://getbootstrap.com/docs/5.1/customize/options/