Skip to content

Instantly share code, notes, and snippets.

View pije76's full-sized avatar

panjianom pije76

View GitHub Profile
@craigvantonder
craigvantonder / gist:a54702cd9bd5c2dd6e8b33c3fce8bc5b
Last active July 26, 2021 17:25
Sublime Text 3 / Network Folder - inotify_add_watch failed: No space left on device
Takes a long time to load project folders running in a VM and the sublime console shows:
inotify_add_watch failed: No space left on device (path: /some/project/location/...)
https://github.com/google/cadvisor/issues/1581#issuecomment-367616070
sudo cat /proc/sys/fs/inotify/max_user_watches # default is 8192
sudo sysctl fs.inotify.max_user_watches=1048576 # increase to 1048576
https://github.com/google/cadvisor/issues/1581#issuecomment-436405681
@mgibbs189
mgibbs189 / custom-loop.php
Last active September 1, 2022 13:25 — forked from SauntValerian/gist:a79845e301de969017e714a96ffee6da
Multiple Loops for FacetWP
<?php
$args = array(
'post_type' => 'location',
'posts_per_page' => -1,
'order' => 'ASC',
'orderby' => 'title',
'facetwp' => true,
'tax_query' => array(
array(
'taxonomy' => 'advertiser-level',

Just some notes and references for myself.

  • In bash, you can access your C:\ drive via /mnt/c/
  • ~ = C:\Users\MLM\AppData\Local\lxss\home\mlm and is different from your Windows user directory C:\Users\MLM

How to google things

@gabrielmerovingi
gabrielmerovingi / mycred-custom-content
Last active July 20, 2019 04:20
Custom myCRED hook example where points are awarded / deducted for newly published posts, based solely on amounts set via a custom taxonomies description field.
/**
* Custom Hook: Points based on taxonomy
* Register the hook so myCRED can load it.
* @since 1.0
* @version 1.1
*/
add_action( 'mycred_setup_hooks', 'mycredpro_register_custom_taxonomy_hook' );
function mycredpro_register_custom_taxonomy_hook( $installed ) {
$installed['publishing_ct_content'] = array(
@stevenyap
stevenyap / Heroku Database.md
Created October 18, 2013 13:52
Heroku for backup, exporting and importing database

Note: You need to have to Heroku PGBackup addon first heroku addons:add pgbackups..

Importing Heroku PG DB to local

Creates the backup on heroku first:

heroku pgbackups:capture