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 / php-docker-ext
Created June 14, 2019 22:37 — forked from hoandang/php-docker-ext
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@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
@dgamboaestrada
dgamboaestrada / ZipUtil.java
Created August 10, 2016 14:26 — forked from fcarriedo/ZipUtil.java
Java Zip util with option to exclude containing folder
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
public class ZipUtil {
private static final int DEFAULT_BUFFER_SIZE = 1024 * 4;
<?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(