Skip to content

Instantly share code, notes, and snippets.

View dwhite440's full-sized avatar

Demond dwhite440

  • South Carolina
View GitHub Profile
Option Explicit
Private Const PAGE_EXECUTE_READWRITE = &H40
Private Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" _
(Destination As Long, Source As Long, ByVal Length As Long)
Private Declare Function VirtualProtect Lib "kernel32" (lpAddress As Long, _
ByVal dwSize As Long, ByVal flNewProtect As Long, lpflOldProtect As Long) As Long
@dwhite440
dwhite440 / google calendar.txt
Created April 24, 2018 22:57
add google calendar
https://calendar.google.com/calendar/r/eventedit?text=Starbucks%C2%AE+Happy+Hour,+Code+3321&dates=20180426T190000Z/20180426T220000Z&details=It%E2%80%99s+a+party+and+you%E2%80%99re+invited!+Starbucks%C2%AE+Happy+Hour+is+Thursday,+April+26.+Enjoy+50%25+off+a+Grande+Macchiato+starting+at+3+p.m.+Simply+show+this+code+to+your+barista:+3321.+Valid+4/26+only+after+3+p.m.+at+participating+Starbucks%C2%AE+stores.+Cannot+be+combined+with+any+other+offer+or+discount.+Offer+excludes+Starbucks+Reserve%C2%AE+Macchiatos.+Limit+one+per+person.+Limited+to+quantities+on+hand.+Code+valid+for+one-time+use.&location=Starbucks&reminder=30&sprop=website:
@dwhite440
dwhite440 / verifypassordreq.js
Created April 10, 2018 20:55
verify password requiremnts
function setupPassword(pswdField, isBlur)
{
// set password variable
var pswd = jQuery(pswdField).val();
var validCount = 0;
//validate the length
if ( pswd.length < 8 ) {
@dwhite440
dwhite440 / vaildatefor.js
Created April 10, 2018 20:54
validate form
//
// Global Variables
//
var errorMessages = {};
var valuechecks = {};
var validatedArray = new Array();
var url = 'validateField';
// -----------------------------------------------------------------------------------
$(function () {
@dwhite440
dwhite440 / phppath.php
Created April 8, 2018 15:52
Define php paths for a project
// Assign file paths to PHP constants
// __FILE__ returns the current path to this file
// dirname() returns the path to the parent directory
define("PRIVATE_PATH", dirname(__FILE__));
define("PROJECT_PATH", dirname(PRIVATE_PATH));
define("PUBLIC_PATH", PROJECT_PATH . '/public');
define("SHARED_PATH", PRIVATE_PATH . '/shared');
@dwhite440
dwhite440 / contact.php
Last active April 8, 2018 15:12
Process php mail and forms
<?php
$errors = [];
$missing = [];
if (isset($_POST['send'])) {
$expected = ['name', 'email', 'comments'];
$required = ['name', 'comments'];
$to = 'David Powers <david@example.com>';
$subject = 'Feedback from online form';
$headers = [];
$headers[] = 'From: webmaster@example.com';
fieldset.scheduler-border {
border: 1px groove #ddd !important;
padding: 0 1.4em 1.4em 1.4em !important;
margin: 0 0 1.5em 0 !important;
-webkit-box-shadow: 0px 0px 0px 0px #000;
box-shadow: 0px 0px 0px 0px #000;
}
legend.scheduler-border {
font-size: 1.2em !important;
@dwhite440
dwhite440 / country
Last active October 6, 2019 18:00 — forked from psamaan/country
Countries Select Option List
<select name="Country">
<option value="" selected="selected">Select Country</option>
<option value="United States">United States</option>
<option value="United Kingdom">United Kingdom</option>
<option value="Afghanistan">Afghanistan</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
<?php // demo/upload_single_example.php
error_reporting(E_ALL);
// MANUAL REFERENCE PAGES YOU MUST UNDERSTAND TO UPLOAD FILES
// http://php.net/manual/en/reserved.variables.files.php
// http://php.net/manual/en/features.file-upload.php
// http://php.net/manual/en/features.file-upload.common-pitfalls.php
// http://php.net/manual/en/function.move-uploaded-file.php