Skip to content

Instantly share code, notes, and snippets.

View yoren's full-sized avatar

Yoren Chang yoren

View GitHub Profile
@yoren
yoren / functions.php
Last active January 1, 2016 08:39 — forked from WerdsWords/post_row_actions.php
Remove quickedit.
<?php
/**
* Disable Quick Edit row action for posts
*
* @see WP_Posts_List_Table::single_row()
*
* @param array $actions An array of row actions, keys corresponding to the span class attribute of each element.
* @param object $post The post object.
*
* @return array The row actions array.
filter:
excluded_paths:
- 'languages/*'
- 'lib/*'
- 'tests/*'
paths:
- 'inc/*'
- '*'
tools:
php_cpd:

Zip excluding specific directories

Exclude .git file and node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/\*

Exclude .git file and files in node_modules directory, but keep node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/**\*