Skip to content

Instantly share code, notes, and snippets.

View ribel's full-sized avatar
🇺🇦

Taras Kruts ribel

🇺🇦
View GitHub Profile
[Xdebug]
zend_extension="%sprogdir%/modules/php/%phpdriver%/ext/php_xdebug.dll"
xdebug.auto_trace = 0
;xdebug.collect_includes = 1
;xdebug.collect_params = 0
;xdebug.collect_return = 0
;xdebug.collect_vars = 0
xdebug.default_enable = 0
;xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD
@ribel
ribel / Get headers
Created May 3, 2013 08:14
PHP usefull code snippets
$headers = apache_request_headers();
$headers1 = '';
foreach ($headers as $header => $value) {
$headers1 .= "$header: $value <br />\n";
}
$file = 'public://headers.txt';
file_put_contents($file, $headers1);
@ribel
ribel / Ctools modal
Created May 3, 2013 08:09
Drupal PHP
ctools_include('ajax');
ctools_include('modal');
ctools_modal_add_js();
$custom_style = array(
'espn-style' => array(
'modalSize' => array(
'type' => 'fixed',
'width' => 850,
'height' => 525,
@ribel
ribel / drupal behaviours
Created May 3, 2013 08:01
Drupal Javascript
(function ($) {
Drupal.behaviors.forExample = {
attach: function (context, settings) {
}
};
})(jQuery);
@ribel
ribel / drush
Created May 3, 2013 07:52
Usefull Drush commands
drush up - update all modules and core
drush up drupal
drush up views, cck
drush updb - run update.php
drush cron - run cron
drush cc all - clear all cache
drush pml --status=enabled - show enabled modules
drush dre
drush vdel -y --exact maintenance_mode - online in drupal 6
drush archive-dump default --destination=/var/backups/fullsite.tar - backup all site
@ribel
ribel / Git how to clone project from repository
Last active December 13, 2015 21:18
Usefull Git Commands
git clone <REPO> .
git submodule update --init