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> | |
<head> | |
<script src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.9.1.min.js"></script> | |
<script src="modal.js"></script> | |
<style type="text/css"> | |
#mask{ | |
position:absolute; /* important */ | |
top:0px; /* start from top */ | |
left:0px; /* start from left */ | |
height:100%; /* cover the whole page */ |
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
git config --global core.editor vim | |
git config --global color.ui true | |
git config --global color.diff.meta "blue black bold" |
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
/** | |
* finds the intersection of | |
* two arrays in a simple fashion. | |
* | |
* PARAMS | |
* @param a - first array, must already be sorted | |
* @param b - second array, must already be sorted | |
* | |
* NOTES | |
* |
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 | |
abstract class Base | |
{ | |
//An array of DB config values | |
protected static $config; | |
//Path to configuration | |
protected static $iniPath = 'C:\Users\winuser\Desktop\dbconfig.ini'; | |
} |
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 | |
/** | |
* A set of generic data structures for extending the Drupal 7 Database class. | |
* | |
* For non-Drupal projects, you could also use this with PDO. | |
* | |
* Just re-write the BaseObject, BaseEntity, BaseCollection classes. | |
* | |
* | |
* Defining your own data types in PHP is as easy as: |
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 | |
/** | |
* A general purpose password hashing routine (from Drupal) | |
* | |
* Requires two standard drupal "include" files (available for download at https://www.drupal.org/): | |
* 1. drupal_bootstrap.inc | |
* 2. drupal_password.inc | |
* | |
* You might also want to use it to manually "reset" a password in a Drupal site's "user" MySQL table | |
* |
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 | |
class DrupalFormBuilder implements ArrayAccess | |
{ | |
private $data = array(); | |
public function __construct(array $fieldsets = array('fs1'=>'fs1')) { | |
foreach($fieldsets as $key=>$fieldset){ | |
$this->addFieldset($fieldset); |
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
class JtXmlParser | |
{ | |
const XML_PATH ='datasource.xml'; | |
const START_NODE = 'ROW'; // the element identifying a new record | |
public $file, | |
$rows = array(), | |
$record = array(), | |
$fdata = '', |
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 | |
/* | |
* Based on SIMPLE CAPTCHA IMAGE SCRIPT by Constantin Boiangiu | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
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 | |
/* Displays details of GD support on your server */ | |
echo '<div style="margin: 10px;">'; | |
echo '<p style="color: #444444; font-size: 130%;">GD is '; | |
if (function_exists("gd_info")) { |