Skip to content

Instantly share code, notes, and snippets.

View FranciscoHV's full-sized avatar

Francisco FranciscoHV

  • Stgo. Chile
View GitHub Profile
@freyr
freyr / php-example.php
Created June 11, 2015 10:18
GetResponse APIv2 example
<?php
# Demonstrates how to add new contact to campaign.
# JSON::RPC module is required
# available at http://github.com/GetResponse/DevZone/blob/master/API/lib/jsonRPCClient.php
require_once 'jsonRPCClient.php';
# your API key is available at
# https://app.getresponse.com/my_api_key.html
@timersys
timersys / script.js
Last active March 1, 2018 16:20
Pause youtube video on popup close
/**
* Replace ID_POPUP with your popup ID
**/
jQuery(document).on('spu.box_close',function(e,id){
if( id == 'ID_POPUP' ) {
toggleVideo('hide');
}
});
function toggleVideo(state) {
@MrVibe
MrVibe / customizer_class.php
Created March 27, 2015 13:50
For WPengine Hosted sites
<?php
if(!class_exists('WPLMS_Customizer_Plugin_Class'))
{
class WPLMS_Customizer_Plugin_Class // We'll use this just to avoid function name conflicts
{
public function __construct(){
add_filter('wplms_login_widget_action',array($this,'mycustom_login_url'));
} // END public function __construct
public function activate(){
@MrVibe
MrVibe / course_product.php
Created March 24, 2015 13:08
Course product shortcode
/*-----------------------------------------------------------------------------------*/
/* Course Product
/*
/* USAGE : xx is course id
/* [course_product id="xx" details="price"]
/* [course_product id="xx" details="sku"]
/* [course_product id="xx" details="sales"]
/* [course_product id="xx" details="note"]
/* Above shortcode can also be used on certificate pages and remove the id field:
@gaulatti
gaulatti / validarRUT.html
Last active June 15, 2023 15:12
HTML5 Chilean RUT Validator
<!doctype html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Validador de RUT HTML5</title>
</head>
<body>
<form>
<input type="text" id="rut" name="rut" required oninput="checkRut(this)" placeholder="Ingrese RUT">
<button type="submit">Validar RUT y Enviar Form</button>
@imath
imath / bpgmq.php
Created November 4, 2013 03:39
This is the complete class for the BuddyPress Codex article : Group Meta Queries: Usage Example. You can test it copying it in the functions.php of your active theme
<?php
/* you can copy & paste from here */
//it's important to check the BP_Group_Extension is available
if( class_exists( 'BP_Group_Extension' ) ) :
/**
* This is a quick and dirty class to illustrate "bpgmq"
* bpgmq stands for BuddyPress Group Meta Query...
* The goal is to store a groupmeta in order to let the community administrator
@imath
imath / bp-customize-registration.php
Created December 16, 2012 18:11
This is a BuddyPress gist. Using it in your active theme will allow you to manage a regular WordPress user meta in the registration form. Just above the profile fields form, you'll see a new text input 'Usermeta'. You can customize the different references to a random user meta i used (bp_cr_usermeta) by your own.
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;
/****
You should paste this into a file (in the example below : bp-customize-registration.php )
in your active theme's folder, then depending if your theme is a child theme or not you should
use this code in your functions.php to include the trick
@juque
juque / MySQL-Chile:regiones-provincias-comunas
Created July 6, 2010 19:32
Chile: Regiones, Provincias, Comunas
/* Estructura y Datos de las Regiones, Provincias */
/* y Comunas de Chile. */
/* */
/* Fecha: Julio 2010 */
/* Autor: Juan Pablo Aqueveque - juque.cl */
--
-- Comunas
--
DROP TABLE IF EXISTS `comunas`;