⌘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
<?php | |
define("SECOND", 1); | |
define("MINUTE", 60 * SECOND); | |
define("HOUR", 60 * MINUTE); | |
define("DAY", 24 * HOUR); | |
define("MONTH", 30 * DAY); | |
/** | |
* Humanize by delta. | |
* |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
### | |
# Este Script sube fotos a tu album de Picasa web. | |
# Uso : python uploader.py -l <directorio> | |
### | |
import gdata.photos.service | |
import gdata.media | |
import gdata.geo | |
import os |
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
# Recursively add a .gitignore file to all directories | |
# in the working directory which are empty and don't | |
# start with a dot. Helpful for tracking empty dirs | |
# in a git repository. | |
find . -type d -regex ``./[^.].*'' -empty -exec touch {}"/.gitignore" \; |
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(). |