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
? .svn | |
? activitystream_delicious/.svn | |
? activitystream_digg/.svn | |
? activitystream_feed/.svn | |
? activitystream_flickr/.svn | |
? activitystream_flickr/PEAR/.svn | |
? activitystream_flickr/PEAR/DB/.svn | |
? activitystream_flickr/PEAR/HTTP/.svn | |
? activitystream_flickr/PEAR/HTTP/Request/.svn | |
? activitystream_flickr/PEAR/Net/.svn |
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
dpm($zipfunction, 'zipfunction'); | |
dpm($files, 'files'); | |
if ( !function_exists($zipfunction) ) { | |
drupal_set_message(t('Function !zipfunction not available - look for an issue at !project_url.', array('!zipfunction' => $zipfunction, '!project_url' => l('the ZipCart project page', 'http://drupal.org/project/zipcart'))), 'error'); | |
return 'Download failed - Zip function not supported.'; | |
} | |
else { | |
if ( !$zipfunction($files) ) { | |
return 'Download failed.' ; | |
} |
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
/** | |
* Get the files as a zip | |
*/ | |
function zipcart_get_zip() { | |
if ( empty( $_SESSION['zipcart']['files'] ) ) { | |
drupal_set_message('Sorry, there are no files queued for you to download.'); | |
drupal_goto(); | |
} | |
else { | |
$files = $_SESSION['zipcart']['files'] ; |
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
/** | |
* Zip callback: PHP zip extension | |
*/ | |
function _zipcart_phpzip($files) { | |
$zip = new ZipArchive; | |
$filename = file_directory_path() .'/'. variable_get('zipcart_cache','zipcart') .'/'. time() .'.zip' ; | |
$zip_open = $zip->open($filename, ZIPARCHIVE::CREATE) ; | |
if ($zip_open === TRUE) { | |
dpm('zip opened'); | |
// would be nice to handle duplicate filenames here |
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
root@lucid64:/etc/chef# chef-solo -l debug -c config/solo.rb -j config/chef.json | |
INFO: *** Chef 0.10.2 *** | |
DEBUG: Building node object for lucid64 | |
DEBUG: Extracting run list from JSON attributes provided on command line | |
INFO: Setting the run_list to "test::default" from JSON | |
DEBUG: Applying attributes from json file | |
DEBUG: Platform is ubuntu version 10.04 | |
INFO: Run List is [recipe[test::default]] | |
INFO: Run List expands to [test::default] | |
INFO: Starting Chef Run for lucid64 |
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
dpm($vars['footprints'], 'vars[footprints] at line 453'); | |
foreach ($vars['footprints'] as $k => $footprint) { | |
dpm($vars['footprints'], 'vars[footprints] at line 455, foreach is at: '. $k); |
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
<pre> | |
<?php | |
/* | |
after using foreach to iterate /by reference/ across an array containing objects, | |
then on the second foreach of the same array, | |
the final member of the array gets overwritten by the previous | |
and c=b | |
if we don't iterate by reference on the first pass, then it doesn't happen |
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
<pre> | |
<?php | |
/* | |
after using foreach to iterate /by reference/ across an array containing objects, | |
then on the second foreach of the same array, | |
the final member of the array gets overwritten by the previous | |
and c=b | |
if we don't iterate by reference on the first pass, then it doesn't happen |
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 | |
if( $_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1') | |
{ | |
ob_start(); | |
phpinfo(); | |
$pinfo = ob_get_contents(); | |
ob_end_clean(); | |
echo str_replace( '<head>', '<head><link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />', $pinfo); | |
} |
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
#!/bin/bash | |
# where the files went missing from | |
LIBRARY1="/Volumes/Image_Library/Clients" | |
LIBRARY2='/Volumes/Image_Library/CLIENTNAME' | |
# where the files ended up | |
RECOVERED="/Volumes/My Pictures" | |
# files to output reports to | |
REPORT_MISSING=report-missing.txt |
OlderNewer