Skip to content

Instantly share code, notes, and snippets.

/**
* Insert a value or key/value pair after a specific key in an array. If key doesn't exist, value is appended
* to the end of the array.
*
* @param array $array
* @param string $key
* @param array $new
*
* @return array
*/
@costidima
costidima / .gitignore
Created October 5, 2015 15:02
Wordpress .gitingnore
*.log
.htaccess
sitemap.xml
sitemap.xml.gz
wp-config.php
wp-content/advanced-cache.php
wp-content/backup-db/
wp-content/backups/
wp-content/blogs.dir/
wp-content/cache/
@costidima
costidima / rimraf
Last active September 27, 2015 12:02
Delete long paths in Windows
npm install rimraf -g
rimraf node_modules
git rm -f $(git ls-files --deleted)