Skip to content

Instantly share code, notes, and snippets.

View QROkes's full-sized avatar

Cristhian Martínez Ochoa QROkes

View GitHub Profile
@QROkes
QROkes / qa-plugin.php
Last active January 11, 2020 20:35
Akismet SPAM Check for Question2Answer
<?php
/*
File: qa-plugin/webinoly-custom/qa-plugin.php
Description: Anti SPAM Registration Plugin for Question2Answer
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@QROkes
QROkes / qa-plugin.php
Last active February 23, 2021 10:30
Anti SPAM Registration Plugin for Question2Answer - StopForumSpam API
<?php
/*
File: qa-plugin/webinoly-custom/qa-plugin.php
Description: Anti SPAM Registration Plugin for Question2Answer
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
@QROkes
QROkes / qa-plugin.php
Created July 25, 2018 18:16
Add the META robots noindex for better SEO and avoid duplicate content in Question2Answer forum.
<?php
/*
Plugin Name: SEO Custom Meta-Robots
Plugin URI: https://qrokes.com/
Plugin Description: SEO Custom Meta Robots
Plugin Version: 1.0
Plugin Date:
Plugin Author: QROkes
Plugin Author URI: https://qrokes.com/
Plugin License: GPLv3
@QROkes
QROkes / nginx.conf
Last active July 12, 2024 04:41
Nginx (Reverse Proxy) Configuration file for Traccar GPS
server {
listen 80;
listen [::]:80;
server_name domain.com;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@QROkes
QROkes / traccar.xml
Last active September 29, 2018 09:38
Traccar GPS Configuration file
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>
<entry key="config.default">./conf/default.xml</entry>
<!-- DataBase MariaDB -->
<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://[HOST]:3306/[DATABASE]?useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
<entry key='database.user'>[USER]</entry>
@QROkes
QROkes / index.html
Created March 6, 2016 00:21
How to center an image (vertically & horizontally) on a simple HTML web page.
<!DOCTYPE html>
<html lang="es-MX">
<head>
<meta charset="UTF-8" />
<title>Tituo de la pagina</title>
<meta name="description" content="Agregar descripcion">
<style type="text/css"> <!--Fix width, height and margin -->
img {
width: 600px;
height: 340px;
@QROkes
QROkes / functions.php
Last active February 23, 2016 03:56
Modify entry comments in WordPress according to the e-mail address.
// Modify entry comments
function qr_admin_author($comment_data){
if ($comment_data['comment_author_email'] == 'mail@domain.com') {
$comment_data['user_ID'] = 1;
$comment_data['comment_author'] = 'Author Name';
$comment_data['comment_author_url'] = 'Author URL';
}
return $comment_data;
}
add_filter('preprocess_comment','qr_admin_author');
@QROkes
QROkes / mypage.html
Last active August 21, 2020 23:46
HTML Head metatags with OpenGraph (Facebook & Twitter)
<html lang="es-MX" xmlns:fb="http://ogp.me/ns/fb#" prefix="og: http://ogp.me/ns#"/>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Titulo de la página</title>
<meta name="description" content="Descripción de la página"/>
<link rel="canonical" href="http://mydomain.com/pagina" />
<meta name="robots" content="index,follow" />