This file contains hidden or 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
module.exports = function(grunt) { | |
// Project config | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
// Variables | |
scssPath: 'style/', | |
scssFile: '<%= scssPath %><%= pkg.name %>.scss', | |
scssIncludes: '<%= scssPath %>**/*.scss', | |
jsPath: 'js/', |
This file contains hidden or 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
var getRequestParam = (function(window) { | |
var params = [], keys = [], values = []; | |
return function(param) { | |
var index = -1, pair; | |
if (params.length === 0) { | |
params = window.location.href.split("?"); | |
if (params.length === 1) return false; | |
params = params[1].split("&"); | |
params.forEach(function(p) { | |
pair = p.split("="); |
This file contains hidden or 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 | |
/* | |
* DatabaseUtils.php - A class of simple database utilities. | |
* | |
* Performs CRUD operations using PDO (MySQL) prepared statements. | |
* | |
* Author: bencentra (https://gist.github.com/bencentra/92228e1f4139436c4153) | |
*/ |
This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<meta name="author" content=""> | |
<title>E-Signature</title> |
This file contains hidden or 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 | |
$dbName = ""; // Name of the database to use | |
$dbUser = ""; // Username of the database user | |
$dbPass = ""; // Password of the database user | |
$dbHost = ""; // Host of the database | |
try { | |
// Create a global PDO object | |
$pdo = new PDO( |
This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<meta name="author" content=""> | |
<title>Page Title</title> |
This file contains hidden or 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 | |
// Include the database connection info | |
require_once("path/to/dbInfo.inc"); | |
/* | |
* Database methods | |
*/ | |
function db_select($sql, $data) | |
{ |
This file contains hidden or 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> | |
<head> | |
<title>Canvas! Yeah!</title> | |
<style type="text/css"> | |
* { | |
font-family: Calibri, Arial, sans-serif; | |
} | |
.center { |
This file contains hidden or 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 | |
function xss_whitelist($input, $limit = null, $offset = 0) | |
{ | |
// Force input to be a string0 | |
$x = (string) $input; | |
// Allow alphanumeric characters, whitespace, and specific characters | |
$x = preg_replace("/[^a-zA-Z0-9 -:,.!?\/|]/", "",$x); | |
// Limit characters |
This file contains hidden or 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> | |
<head> | |
<title>SVG Spinner</title> | |
<style type="text/css"> | |
* { | |
font-family: Arial, sans-serif; | |
} | |
#wrapper { | |
width: 400px; |