Skip to content

Instantly share code, notes, and snippets.

View LockeAG's full-sized avatar

Adrian Galvez G. LockeAG

View GitHub Profile
<?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(
@LockeAG
LockeAG / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@LockeAG
LockeAG / old.php
Last active August 29, 2015 14:13 — forked from agustinho/old.php
<!--Inicia EPlanning-->
<?php //define nombre de sec:
/*$detect = new Mobile_Detect();
if( $detect->isMobile() && !$detect->isTablet()){
$seccion='Mobile';
} else {*/
if (is_single() || is_page()){
$seccion='notas';
} elseif (is_front_page()) {
@LockeAG
LockeAG / gist:e6b6e6fe2f7ee896cdbb18cc29e9cdf5
Created January 21, 2017 16:29 — forked from allenhurff/gist:e1a651a7a37ae491ccbc
crateful.la wp-config docker-compose
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2
# - and tmux is 1.9 or 1.9a
@LockeAG
LockeAG / inject_script_to_page.js
Created March 1, 2019 05:25 — forked from midlan/bookmarklet_inject_script_to_page.js
Code snippet to inject script to page, e.g. jquery. It can be used directly as bookmark in some browsers. (tested in chrome)
javascript: (function() {
var url = prompt('URL of script to inject:');
if (url) {
console.log('Script inject request URL:', url);
var script = document.createElement('script');
script.src = url;
@LockeAG
LockeAG / .zsh_plugins.txt
Created February 29, 2020 22:50
ZSH setup and plugins I use with http://getantibody.github.io/
# Bundles from the default repo (robbyrussell's oh-my-zsh).
robbyrussell/oh-my-zsh folder:plugins/git
robbyrussell/oh-my-zsh folder:plugins/github
robbyrussell/oh-my-zsh folder:plugins/heroku
robbyrussell/oh-my-zsh folder:plugins/lein
robbyrussell/oh-my-zsh folder:plugins/command-not-found
# robbyrussell/oh-my-zsh folder:plugins/common-aliases
robbyrussell/oh-my-zsh folder:plugins/autojump
robbyrussell/oh-my-zsh folder:plugins/compleat
@LockeAG
LockeAG / checkbox_checked.js
Last active May 17, 2020 19:57
Checkbox Checked React
const [aht, setAht] = useState('')
<Col lg={4}>
<FormGroup>
<Label for="aht">AHT</Label>
<div>
{aht.includes(0) ? (
<CustomInput
id="hiper0"
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"