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
template<class Iterator> | |
void quickSort(Iterator begin, Iterator end) | |
{ | |
Iterator pivot = begin; | |
if (begin == end) { | |
return; | |
} |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2276734/hack.sh | sh | |
# |
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 | |
/** | |
* @category Nooku | |
* @package Nooku_Server | |
* @subpackage Default | |
* @copyright Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net). | |
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> | |
* @link http://www.nooku.org | |
*/ |
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
#!/usr/bin/env python | |
import sys, os | |
help = """ | |
Usage: ./batch_symlinker destination projects [..] | |
Example: ./batch_symlinker joomla17 nooku-framework nooku-components fileman | |
""" | |
projects_dir = '/Users/ercan/Projects' | |
sites_dir = '/Users/ercan/www' |
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
#!/usr/bin/python | |
import sys, os | |
source_dir = os.path.realpath(sys.argv[1]) | |
target_dir = os.path.realpath(sys.argv[2]) | |
""" | |
This function merges the source directory to target directory as symlinks | |
@Author: Israel D. Canasa (http://israelcanasa.com) |
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
import sys, os, shutil, glob, zipfile | |
from xml.etree.ElementTree import ElementTree | |
class Packager: | |
temp = 'temp' | |
def __init__(self): | |
pass | |
def package(self, manifest_path): | |
self.manifest_path = manifest_path |
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
{ | |
"jsonapi": { | |
"version": "1.0" | |
}, | |
"links": { | |
"self": "http:\/\/docman.dev\/administrator\/index.php?option=com_docman&view=documents&format=json" | |
}, | |
"data": [ | |
{ | |
"type": "document", |
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
$document_details = array( | |
'title' => 'document title', | |
'docman_category_id' => 1, | |
'storage_type' => 'file', | |
'storage_path' => 'path/to/the/file' // part of the path that comes after joomlatools-files/docman-files/ | |
); | |
$result = KObjectManager::getInstance()->getObject('com://site/docman.controller.document', array( | |
'request' => KObjectManager::getInstance()->getObject('request') | |
))->add($document_details); |
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 | |
/** | |
* Put this file in the cli/ folder in your Joomla site and call it from the command line: | |
* $ php filename.php | |
*/ | |
@ini_set('memory_limit', -1); | |
@ini_set('xdebug.max_nesting_level', 2000); | |
const _JEXEC = 1; | |
const FOF_INCLUDED = 1; // Trick the system into believing FOF is already included |
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
kQuery(function($) { | |
var requests = [], | |
flattenArray = function(items){ | |
var object = {}; | |
$.each(items, function(i, item){ | |
object[item.name] = item.value; | |
}); | |
return object; | |
}, | |
getQueryString = function(form, defaults) { |
NewerOlder