Skip to content

Instantly share code, notes, and snippets.

View davidnknight's full-sized avatar

David Knight davidnknight

View GitHub Profile
@davidnknight
davidnknight / Gulpfile
Last active June 19, 2021 03:23
A well structured gulpfile that performs CSS, JS, image and PHP tasks with an abstract config.
Specifically, this gruntfile will perform the following.
- CSS:
-- Compile SCSS
-- Add vendor prefixes for the last 10 browser versions
- JS:
-- Run scripts through jshint to detect errors and potential problems in code.
-- Compile scripts to your destination folder in their original state. Use these in development environments as they'll be easier to debug with as their code doesn't exist on 1 line, nor is it obfuscated.
-- Minify and concatenate scripts into one all.min.js. Uglify will also obfuscate code if you set mangle to true, leave as false if using AngularJS.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1">
<title>untitled</title>
<link rel="stylesheet" href="">
</head>
<body>
@davidnknight
davidnknight / send_email.php
Created July 20, 2012 12:01
PHP Send Mail (Plaintext and HTML)
<?php
/**
* Send email
* @param string|array $email
* @param object $from
* @param string $subject
* @param string $message
* @param string $headers optional
*/
function send_email($email, $from, $subject, $message, $headers = null)