Skip to content

Instantly share code, notes, and snippets.

@iamshacky
iamshacky / form.html
Last active December 12, 2022 14:30 — forked from daveh/form.html
PHP File Uploads (code to accompany https://youtu.be/K_W5ZqwEcqs)
View form.html
<!-- https://www.youtube.com/watch?v=K_W5ZqwEcqs -->
<!DOCTYPE html>
<html>
<head>
<title>PHP File Uploads</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">
</head>
<body>
@iamshacky
iamshacky / sassas.md
Created November 16, 2022 10:11 — forked from AdamMarsden/sassas.md
Sass Architecture Structure
View sassas.md

Sass Architecture Structure

sass/
|
|– base/
|   |– _reset.scss       # Reset/normalize
|   |– _typography.scss  # Typography rules
|   ...                  # Etc…
|
@iamshacky
iamshacky / wordpress-page-temaplate.php
Created January 14, 2022 18:02 — forked from brickbones/wordpress-page-temaplate.php
WordPress page template with API (javascript and php)
View wordpress-page-temaplate.php
<?php /* Template Name: Awesome Page */
get_header();
?>
<div class="latest-posts"></div>
<script>
View 20180523_Create_a_database_Exercise41.md

Exercise 4.1 - Solutions:

Design

Job Board Database Design schema on Imgur

Create tables

-- Temporal.
@iamshacky
iamshacky / ContactForm.md
Created May 24, 2021 03:34 — forked from patotoma/ContactForm.md
secure php contact form
View ContactForm.md

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)){
@iamshacky
iamshacky / output-articles-by-collection.liquid
Created April 22, 2021 00:15 — forked from nternetinspired/output-articles-by-collection.liquid
Loop through Jekyll collections and output their content as sections and articles
View output-articles-by-collection.liquid
{% comment %}
Loops though every collection you defined in _config.yml and grabs the pages they contain; outputting title and full text with good basic html semantics.
Use page.excerpt instead of page.content to grab the first paragraph, blog list style. Markdownify is optional, depends how you authored content in your collections; I typically use Markdown.
{% endcomment % }
{% for collection in site.collections %}
{% assign name = collection.label %}
<section>
@iamshacky
iamshacky / 1-base.html
Created April 8, 2021 00:10 — forked from joar/1-base.html
Multiple and extending base templates in Django
View 1-base.html
<html>
<head>
<title>Foo</title>
</head>
<body>
<header>
{% block header %}
<h1>Lorem ipsum</h1>
{% endblock %}
</header>