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 Pull | |
* | |
* @author Adam Patterson | |
* http://www.adampatterson.ca/blog/2011/10/diy-simple-staging-server/ | |
* | |
* Use: echo pull(); | |
*/ | |
function pull ( ) |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Columns</title> | |
<style type="text/css" media="screen"> | |
.container{ | |
width: 75%; | |
display: block; | |
} |
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 | |
/* | |
// Ussage: | |
// documentation of this process and these example values are taken from | |
// https://inkdit.desk.com/customer/portal/articles/685178 | |
require 'inkdit.php'; |
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
<? | |
define('APP_PATH', __DIR__.'/'); | |
function delete_dir($dir) { | |
if (substr($dir, strlen($dir)-1, 1) != '/') | |
$dir .= '/'; | |
if ($handle = opendir($dir)) | |
{ | |
while ($obj = readdir($handle)) |
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
CREATE TABLE 'users' ( | |
'id' bigint(20) unsigned NOT NULL AUTO_INCREMENT, | |
'email' varchar(100) NOT NULL DEFAULT '', | |
'username' varchar(60) NOT NULL DEFAULT '', | |
'password' varchar(64) NOT NULL DEFAULT '', | |
'type' varchar(25) DEFAULT NULL, | |
'data' text, | |
PRIMARY KEY ('id') | |
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; |
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
/** | |
* Function: recursive_glob | |
* Recursively goes through a folder and returns all files. | |
* | |
* Parameters: | |
* $pattern - String | |
* $flags - Boolean | |
* $path - String | |
* | |
* Returns: |
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
<? if(!defined('DINGO')){die('External Access to File Denied');} | |
if ( getenv( "VCAP_SERVICES" ) ) { | |
$services_json = json_decode(getenv("VCAP_SERVICES"),true); | |
$mysql_config = $services_json["mysql-5.1"][0]["credentials"]; | |
$username = $mysql_config["username"]; | |
$password = $mysql_config["password"]; | |
$hostname = $mysql_config["hostname"]; | |
$db = $mysql_config["name"]; |
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
.container { | |
display: block; | |
width: 80%; | |
margin: 60px auto; | |
} | |
.clearfix { | |
*zoom: 1; | |
&:before, | |
&:after { |
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 | |
/* | |
Plugin Name: Next Post | |
Plugin URI: http://adampatterson.ca | |
Description: Provides shortcodes and template tags for next/previous navigation in custom post types. | |
Version: 1 | |
License: GPLv2 | |
Author: Adam Patterson | |
Author URI: http://adampatterson.ca | |
*/ |
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
// Load this as part of your Bootstrap mixins.less make sure to also compile the responsive.less if needed. | |
// Adds centered columns. | |
/* | |
<div class="row"> | |
<div class="center6"> | |
<div class="span3">3</div> | |
<div class="span3">3</div> | |
</div> | |
</div> |
OlderNewer