Skip to content

Instantly share code, notes, and snippets.

View JoaquinGA's full-sized avatar

Joaquín Gómez JoaquinGA

  • Sevilla, España
View GitHub Profile
@JoaquinGA
JoaquinGA / .htaccess
Created April 26, 2017 09:46
Comprobar si mod_rewrite está activado (Acceder a dominio.es/prueba.html)
RewriteEngine On
RewriteRule prueba.html http://www.google.es [R]
@JoaquinGA
JoaquinGA / superlog.sh
Created April 21, 2017 11:11
Git superlog Platzi
git config --global alias.superlog "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
@JoaquinGA
JoaquinGA / function.php
Created April 18, 2017 16:10
Crear custom post
<?php
if ( ! function_exists('Custom_Post_Type_Receta') ) {
// Register Custom Post Type
function Custom_Post_Type_Receta() {
$labels = array(
'name' => _x( 'Recetas', 'Post Type General Name', 'text_domain' ),
@JoaquinGA
JoaquinGA / relocate.js
Created April 18, 2017 15:49
Redireccionar página enviando parámetros post
function relocate(page,params){
var body = document.body;
form=document.createElement('form');
form.method = 'POST';
form.action = page;
form.name = 'jsform';