This file contains 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 buildHierarchy(&$results, $parent = 0, $level = 0) | |
{ | |
global $modx; | |
$children = array_values($modx->getChildIds($parent, 1)); | |
$level = $level + 1; | |
foreach($children as $child) | |
{ | |
$descendents = array_values($modx->getChildIds($child, 100)); |
This file contains 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 | |
// Use with OnLoadWebDocument | |
// Checks if in an Ajax call is made by checking if the value in X-Requested-With is given in the header. | |
if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) { | |
$modx->documentContent = '[*content*]'; | |
} | |
?> |
This file contains 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
source ~/bin/aliases | |
source ~/bin/gitprompt | |
export PATH="/usr/local/bin:~/bin:$PATH" | |
export SVN_EDITOR="mate -w" | |
export GIT_EDITOR="mate -w" |
This file contains 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
/* | |
From: http://github.com/M4N14C/StoopidCMS/blob/master/public/javascripts/facebooker.js | |
*/ | |
function $(element) { | |
if (typeof element == "string") { | |
element=document.getElementById(element); | |
} | |
if (element) | |
extend_instance(element,Element); | |
return element; |
This file contains 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
/* | |
* SWFUpload jQuery Plugin v1.0.0 | |
* | |
* Copyright (c) 2009 Adam Royle | |
* Licensed under the MIT license. | |
* | |
*/ | |
(function($){ | |
This file contains 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 | |
// Specifically for foxycart -> modx | |
// Add 1 day (86400 seconds) to the transaction date. | |
date('U', strtotime($order['order']['next_transaction_date']) + 86400) |
This file contains 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
==Steps | |
1. Add remote | |
2. Fetch remote | |
2. checkout new branch at new remote | |
3. switch to master | |
4. read tree into new folder | |
==Example | |
git remote add REPO_remote [email protected]:schacon/rack.git | |
git fetch REPO_remote |
This file contains 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 | |
//File: osc/includes/password_funcs.php | |
/* | |
$Id: password_funcs.php 1739 2007-12-20 00:52:16Z hpdl $ | |
osCommerce, Open Source E-Commerce Solutions | |
http://www.oscommerce.com | |
Copyright (c) 2003 osCommerce |
This file contains 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
<script type="text/javascript" charset="utf-8"> | |
jQuery(document).ready(function(){ | |
// Set the indexes for the countries you want to allow | |
var usIndex = -1; | |
var caIndex = -1; | |
// Find their positions in the array using the 2 character ISO code | |
for (var i = 0; i < FC.locations.config.locations.length; i++) { | |
if (FC.locations.config.locations[ i ].cc2 == "US") { | |
usIndex = i; | |
} else if (FC.locations.config.locations[ i ].cc2 == "CA") { |
OlderNewer