View txplib_db.php
<?php | |
/** | |
* Class DB | |
*/ | |
class DB | |
{ | |
/** | |
* @var | |
*/ | |
protected $config; |
View provision-selenium.sh
#!/usr/bin/env bash | |
# =================================================== | |
# Start Setup | |
# =================================================== | |
cd ~/ | |
# Update yum | |
sudo yum -y update | |
# =================================================== |
View get_selenium.sh
#!/usr/bin/env bash | |
# Get Selenium and Firefox for headless testing in vagrant box | |
if [ ! -d "/var/selenium" ]; then | |
sudo mkdir /var/selenium | |
cd /var/selenium | |
sudo wget http://goo.gl/PJUZfa selenium-server-standalone.jar | |
fi | |
sudo yum -y install java-1.8.0-openjdk-headless.x86_64 | |
sudo yum -y install firefox.x86_64 | |
sudo yum -y install xorg-x11-server-Xvfb.x86_64 |
View GetMail.php
<?php | |
/* | |
* File: GetMail.php | |
* Description: Receiving mail With Attachments | |
* | |
* @package Pbc\Mail | |
* @author Mitul Koradia <mitulkoradia@gmail.com> | |
* @author Nate Nolting <naten@paulbunyan.net> | |
* @version: 1.1 | |
*/ |
View MY_Session.php
<?php | |
class MY_Session extends CI_Session { | |
protected $cliTestingDriver = 'codeception'; | |
public function __construct(array $params = array()) | |
{ | |
parent::__construct($params); |
View Session_codeception.php
<?php | |
/** | |
* CI3 flat file session driver used for testing with Codeception | |
*/ | |
/** | |
* Class CI_Session_codeception | |
*/ | |
class CI_Session_codeception extends CI_Session_driver |
View txplib_misc.php
// ------------------------------------------------------------- | |
// Format a time, respecting the locale and local time zone, | |
// and make sure the output string is safe for UTF-8 | |
function safe_strftime($format, $time='', $gmt=0, $override_locale='') | |
{ | |
global $locale; | |
$old_locale = $locale; | |
if (!$time) | |
$time = time(); |
View Premailer.php
<?php | |
/** | |
* Premailer API PHP class | |
* Premailer is a library/service for making HTML more palatable for various inept email clients, in particular GMail | |
* Primary function is to convert style tags into equivalent inline styles so styling can survive <head> tag removal | |
* Premailer is owned by Dialect Communications group | |
* @link http://premailer.dialect.ca/api | |
* @author Marcus Bointon <marcus@synchromedia.co.uk> | |
*/ | |
View Cache.php
/** | |
* Delete Full Cache or Cache subdir | |
* Skips .htaccess and index.htm(l) files for security | |
* | |
* @access public | |
* @param string | |
* @return void | |
*/ | |
function delete_all($dirname = '') | |
{ |
View resize_iframe_js.misc.txp
<iframe src="/somelocalfile.htm" frameborder="0" scrolling="no" width="100%" id="myIframe" class="auto-height"></iframe> | |
<script type="text/javascript" src="/js/libs/iframe-auto-height/jquery.iframe-auto-height.js"></script> | |
<script language="JavaScript"> | |
jQuery('iframe.auto-height').iframeAutoHeight({ | |
heightOffset: 10, | |
minHeight: 300 | |
}); | |
</script> |
NewerOlder