Skip to content

Instantly share code, notes, and snippets.

View aficiomaquinas's full-sized avatar

Víctor González aficiomaquinas

View GitHub Profile
@aficiomaquinas
aficiomaquinas / delete_coupons.sh
Last active April 24, 2024 20:44
Move unused coupons to trash, then empty coupons trash in Woocommerce manually using WP-CLI
#!/bin/bash
# Sometimes when the trash bin is too large for coupons (or other post_types),
# simply emptying the trash directly in the Wordpress front-end throws 500 errors
# or timeouts, that's why I created this script. Adjust the 'post_type',
# 'delete_batch_type' and 'pause_duration' accordingly.
# Configurable batch size for deleting posts
delete_batch_size=1000

Keybase proof

I hereby claim:

  • I am aficiomaquinas on github.
  • I am aficio (https://keybase.io/aficio) on keybase.
  • I have a public key ASBY_x-ZeJK3d83HF6OBO4XhKYJ5sVdZVc7pIYW68x23Lwo

To claim this, I am signing this object:

module.exports = function(grunt) {
grunt.initConfig({
compass: {
options: {
sassDir: "src/sass",
cssDir: "src/css",
imagesDir: "src/img",
fontsDir: "src/fonts",
javascriptsDir: "src/js"
},
# .bash_profile
################
# Show/hide files
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
# NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
@aficiomaquinas
aficiomaquinas / gist:6910030
Created October 9, 2013 23:02
Postmaster.io fit packages error
curl https://api.postmaster.io/v1/packages/fit \
-u {{apikey}}: \
-H "Content-Type: application/json" \
-d '{
"items":[
{
"width":5,
"length":7,
"height":10,
"count":4,