Skip to content

Instantly share code, notes, and snippets.

@nucklearproject
nucklearproject / template.tpl.php
Created Dec 9, 2012 — forked from gagarine/template.tpl.php
Working with drupal theme_menu_tree
View template.tpl.php
<?php
/**
* Theme_menu_tree doesn't provide any context information
* THIS SUCKS
* But you can use hook_block_view_alter to change the theme wrapper
* OUF!
*/
function MYTHEME_menu_tree(&$variables) {
View Recursively add .gitignore files to empty dirs
# 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" \;
@nucklearproject
nucklearproject / gist:3791340
Created Sep 26, 2012 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View gist:3791340

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
View Recursively add .gitignore files to empty dirs
My .gitignore YII
#editors
*.swp
.buildpath
.project
.settings
nbproject
.idea
*.sublime-project
*sublime-workspace