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
function example() { | |
var o = {}, i = 0; | |
for (i = 0; i < 3; i++) { | |
o[i] = function() { | |
console.log(i); | |
}; | |
} | |
o[0](); | |
o[1](); | |
o[2](); |
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
(function ($) { | |
Drupal.behaviors.<replace with module name> = { | |
attach: function (context, settings) { | |
$(document).ready(function() { | |
... stuff goes 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
/** | |
* Implements hook_menu(). | |
*/ | |
function <replace with module name>_menu() { | |
$items['path1/path2'] = array( | |
'title' => 'some text for the title', | |
'description' => 'some text for the description', | |
'page callback' => '<replace with module name>_page', | |
'page arguments' => array(1), |
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
$batch = array( | |
'title' => t('Moving files...'), | |
'operations' => array(), | |
'init_message' => t('Finding files to move'), | |
'progress_message' => t('Processed @current out of @total files.'), | |
'error_message' => t('An error occurred during processing.'), | |
'finished' => 'xxx_file_finished', | |
'progressive' => FALSE, | |
); |
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
/** | |
* Implements hook_theme(). | |
* | |
* Define custom theme hooks | |
*/ | |
function <replace with module name>_theme($existing, $type , $theme, $path) { | |
return array( | |
'<replace with module name>_<block name>' => array( | |
'template' => 'templates/<replace with module name>-<block name>', | |
'file' => '<block name>.theme.inc', |
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
# list all .pdf files in a directory | |
ls | egrep '\.pdf$' |
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
find /sites/default/files -type f -not -name "*.gif" -not -name "*.jpg" -not -name "*.css" -not -name "*.JPG" -not -name "*.jpeg" -not -name "*.js" -not -name "*.png" |
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
diff --git a/panopoly.info b/panopoly.info | |
index 3aea3d4..f483782 100644 | |
--- a/panopoly.info | |
+++ b/panopoly.info | |
@@ -37,3 +37,6 @@ dependencies[] = panopoly_wysiwyg | |
dependencies[] = navbar | |
dependencies[] = devel | |
dependencies[] = uuid | |
+ | |
+; GSB Panopoly |
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
$permissions = test_invoke_all('permission'); | |
foreach ($permissions as $key => $value) { | |
$title = $value["title"]; | |
$description = ""; | |
$module = $value["module"]; | |
if (isset($value["description"])) { | |
$description = $value["description"]; | |
} | |
echo "$module&$key&$title&$description \n"; | |
} |
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
// $stuff = module_implements('menu'); | |
//$stuff = module_hook_info(); | |
$sort = TRUE; | |
$stuff = module_list(FALSE, FALSE, $sort); | |
dsm($stuff); |
OlderNewer