| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
This file contains hidden or 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
| :regex | |
| jQuery.expr[':'].regex = function(elem, index, match) { | |
| var matchParams = match[3].split(','), | |
| validLabels = /^(data|css):/, | |
| attr = { | |
| method: matchParams[0].match(validLabels) ? | |
| matchParams[0].split(':')[0] : 'attr', | |
| property: matchParams.shift().replace(validLabels,'') | |
| }, | |
| regexFlags = 'ig', |
This file contains hidden or 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
| $handler->argument = str_replace('_', ' ', $argument); | |
| return TRUE; |
This file contains hidden or 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
| #IDE resources | |
| .project | |
| *.config | |
| .idea | |
| .settings | |
| resources | |
| nbproject | |
| private | |
| .idea | |
| *.sublime-project |
This file contains hidden or 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
| imagecache, imagacache_customactions example | |
| if($image->info['width'] < 500 || $image->info['height'] < 500 ){ | |
| //imageapi_image_scale($image, $width = 500 ); | |
| return $image; | |
| } else { | |
| imageapi_image_scale($image, $width = 500 ); | |
| return $image; | |
| } |
This file contains hidden or 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
| Generate makefile | |
| FOLDER$drush generate-makefile NAMEFILE.make | |
| Download with make files | |
| $drush make FILE.make FOLDER | |
| Fresh install | |
| FOLDER$drush site-install --account-name=admin --account-pass=admin --db-url=mysql://root:PASS@localhost/DATABASE | |
| List installed themes and modules |
This file contains hidden or 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 | |
| * Replace the submit button to node creation forms that | |
| * allows the content author to return to edit the node | |
| */ | |
| /** | |
| * Implementation of hook_form_alter(). |
This file contains hidden or 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
| File created in webroot. | |
| <?php | |
| error_reporting(E_ALL); | |
| require_once 'includes/bootstrap.inc'; | |
| drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
| drupal_flush_all_caches(); | |
| $results = db_query('select nid from node where type="store"'); |
This file contains hidden or 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
| My .gitignore YII | |
| #editors | |
| *.swp | |
| .buildpath | |
| .project | |
| .settings | |
| nbproject | |
| .idea | |
| *.sublime-project | |
| *sublime-workspace |
This file contains hidden or 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
| /* Suponiendo que hemos creado nuestro CRUD. creamos un componente - Obviamente lo guardamos como ZHtml.php dentro de nuestra carpeta components, no hace falta inicializarlo si en nuestro main.php tenemos el autoload | |
| 'import'=>array( | |
| 'application.models.*', | |
| 'application.components.*', | |
| ), | |
| ..... | |
| */ | |
| <?php |