Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dgamboaestrada on github.
  • I am dgamboa (https://keybase.io/dgamboa) on keybase.
  • I have a public key ASCGGALgs_xs2-K1bNmuW7b3f5rHWnrv3sppHKlXuZek3go

To claim this, I am signing this object:

@dgamboaestrada
dgamboaestrada / parse-options.sh
Created January 22, 2018 00:21 — forked from cosimo/parse-options.sh
Example of how to parse options with bash/getopt
#!/bin/bash
#
# Example of how to parse short/long options with 'getopt'
#
OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi
echo "$OPTS"
@dgamboaestrada
dgamboaestrada / wordpress_change_site.sql
Last active December 12, 2017 00:10
Wordpress change site url
set @old_url="";
set @new_url="";
UPDATE wp_options SET option_value = replace(option_value, @old_url, @new_url) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, @old_url,@new_url);
UPDATE wp_posts SET post_content = replace(post_content, @old_url, @new_url);
UPDATE wp_postmeta SET meta_value = replace(meta_value, @old_url, @new_url);
@dgamboaestrada
dgamboaestrada / tmux-cheatsheet.markdown
Created November 23, 2016 04:14 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(