Skip to content

Instantly share code, notes, and snippets.

View kidino's full-sized avatar

Iszuddin Ismail kidino

View GitHub Profile
@kidino
kidino / foo_tickets_export.sql
Created September 6, 2022 02:32
Exporting FooEvent Tickets
## THIS IS FOR EXPORTING TICKETS FROM YOUR FOO EVENT WOOCOMMERCE PLUGIN.
## I CREATED THIS BECAUSE I HAVE A DIFFERENT SYSTEM FOR USERS TO LOGIN TO AND
## I WOULD LIKE THE USERS TO BE ABLE TO USE THE SAME TICKET. IN THE NEW SYSTEM
## I REGENERATE THE QR BASED ON TICKET_ID.
SELECT wp00_posts.ID, wp00_posts.post_title, wp00_posts.post_type,
max(case when (meta_key='WooCommerceEventsTicketID') then meta_value else NULL end) as 'Ticket_ID',
max(case when (meta_key='WooCommerceEventsAttendeeName') then meta_value else NULL end) as 'First_Name',
max(case when (meta_key='WooCommerceEventsAttendeeLastName') then meta_value else NULL end) as 'Last_Name',
max(case when (meta_key='WooCommerceEventsAttendeeEmail') then meta_value else NULL end) as 'Email',
@kidino
kidino / query_user.sql
Created November 4, 2021 03:48
Query WP Users and User Meta (based on user roles) into Columns and Filtering
/*
in this example, we are querying users with specific roles and their billing phone numbers
see how we are creating dynamic columns with max and case
also how where are using HAVING to filter group data
*/
SELECT wp_users.display_name, wp_users.user_email,
max(case when (meta_key='billing_phone') then meta_value else NULL end) as 'billing_phone',
@kidino
kidino / toggle-button.json
Created April 28, 2020 04:17
Pricing Table with Toggle Button for Elementor Pro
{"version":"0.4","title":"toggle-pricing-table","type":"section","content":[{"id":"7e71bb5a","settings":{"margin":{"unit":"px","top":"100","right":0,"bottom":"100","left":0,"isLinked":true}},"elements":[{"id":"1987f110","settings":{"_column_size":100,"_inline_size":null},"elements":[{"id":"2c2912c1","settings":{"content_width":{"unit":"px","size":195,"sizes":[]},"height_inner":"min-height","custom_height_inner":{"unit":"px","size":55,"sizes":[]}},"elements":[{"id":"28eca408","settings":{"_column_size":100,"_inline_size":null,"content_position":"center","align":"space-around","background_background":"classic","background_color":"#E7E7E7","border_radius":{"unit":"px","top":"10","right":"10","bottom":"10","left":"10","isLinked":true},"_element_id":"toggle-01","custom_css":"selector {\n cursor: pointer;\n}"},"elements":[{"id":"16108133","settings":{"button_type":"info","text":"-","size":"xs","button_text_color":"#ACAFEA","background_color":"#ACAFEA","border_radius":{"unit":"px","top":"5","right":"5","bottom":"
@kidino
kidino / toggle-button.css
Last active October 5, 2022 12:22
Creating a Toggle Button with Elementor Pro - The CSS & Javascript Code
/*
This is the CSS code for creating your own Toggle Button Widget using
Elementor Pro.
You still need the Javascript code for this to work.
The Youtube tutorial is here. Make sure you watch this to understand
how this works.
https://youtu.be/ZhBGPIU1bq0
@kidino
kidino / carousel-style.css
Last active April 27, 2020 23:55
Customizing Elementor Pro Image Carousell - Custom CSS
@kidino
kidino / carousel-javascript.html
Last active April 27, 2020 23:56
Customizing Elementor Pro Image Carousell - Javascript
@kidino
kidino / teacher.html
Created April 19, 2019 03:00
Teacher Fusio Table
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Teacher</title>
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.css">
<script src="assets/js/jquery.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
@kidino
kidino / Sample Teachers MySQL Table
Created April 14, 2019 02:56
A small sample table for learning and practicing MySQL
CREATE TABLE teachers
(teacher_id INT AUTO_INCREMENT PRIMARY KEY,
formal_title VARCHAR(25),
name_first VARCHAR(100),
name_last VARCHAR(100),
email_address VARCHAR(255));
INSERT INTO teachers
(formal_title, name_first, name_last, email_address)
VALUES
@kidino
kidino / token-login.php
Created December 1, 2018 03:02
Login to WordPress web with JWT
<?php
/*
JWT TOKEN LOGIN -- Automatically logs a user in a WordPress site with JWT
This script allows you to log a user into a WordPress site automatically
based on his/her JSON Web Token (JWT). This assumes that you use the
following plugin and set it up properly on your WordPress site to enable
JWT authentication via REST API.
JWT Authentication for WP REST API
@kidino
kidino / index.html
Created August 25, 2017 12:55
Suspended Website Template
<!--
_____ __ __ _____ ____ ___ ____ ___ ___ ___
/ ___/| | |/ ___/| \ / _]| \ | \ / _]| \
( \_ | | ( \_ | o ) [_ | _ || \ / [_ | \
\__ || | |\__ || _/ _]| | || D || _]| D |
/ \ || : |/ \ || | | [_ | | || || [_ | |
\ || |\ || | | || | || || || |
\___| \__,_| \___||__| |_____||__|__||_____||_____||_____|