start new:
tmux
start new with session name:
tmux new -s myname
| // Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
| $ git ls-files | xargs wc -l |
| [user] | |
| name = Matthias DUGUE | |
| email = [email protected] | |
| [color] | |
| ui = auto | |
| [alias] | |
| st = status -sb | |
| co = checkout | |
| ci = commit | |
| oops = commit --amend -C HEAD |
| [alias] | |
| st = status -sb | |
| co = checkout | |
| amend = commit --amend -C HEAD | |
| lg = log --pretty=format:\"%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]\" --decorate --date=short | |
| undo = reset --soft HEAD^ | |
| lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative | |
| unchanged = update-index --assume-unchanged | |
| [color] | |
| ui = true |
| <?php | |
| function mymodule_admin_image() { | |
| $form = array(); | |
| // Image wrapper | |
| $form['image_default'] = array( | |
| '#type'=>'fieldset', | |
| '#title' => "Image par defaut", | |
| '#collapsible' => TRUE, |
| /** | |
| * Implements hook_field_formatter_info() | |
| */ | |
| function MYMODULE_field_formatter_info() | |
| { | |
| return array( | |
| // Format de téléchargement de fichier | |
| 'MYMODULE_file_link' => array( | |
| 'label' => t('Download link'), | |
| 'field types' => array('file') |
| <?php | |
| // See http://dominiquedecooman.com/blog/drupal-7-tip-add-contextual-links-anything | |
| // See http://drupal.org/node/1089922 | |
| // hook_menu | |
| // Menu item must have 'context' set to MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE | |
| function mymodule_menu() { | |
| return array( |
| <?php | |
| function MYMODULE_drush_command() { | |
| $items = array(); | |
| $items['languages-domain'] = array( | |
| 'aliases' => array('lang-domain'), | |
| 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, // No bootstrap at all. | |
| 'options' => array( | |
| 'domain' => 'Specify domain (local, dev, prod)', |
| *~ | |
| .DS_Store | |
| .idea |
| <?php | |
| /** | |
| * Shell Aliases | |
| */ | |
| $options['shell-aliases']['pull'] = '!git pull'; // We've all done it. | |
| $options['shell-aliases']['pulldb'] = '!git pull && drush updatedb'; | |
| $options['shell-aliases']['noncore'] = 'pm-list --no-core'; | |
| $options['shell-aliases']['wipe'] = 'cache-clear all'; |