Skip to content

Instantly share code, notes, and snippets.

View lasida's full-sized avatar
👋
Let's Connect

lasida

👋
Let's Connect
View GitHub Profile
esc_html__([(])([ ]?)([']?)([ ]?)([A-Za-z_ ]+)([(]?)([)]?)([ ]?)([']?)([ ]?)([)])([;]?)
@lasida
lasida / gist:1c7b7c8cd72b4ae5e48a57983e167ffb
Created December 30, 2016 09:02
Code Javascript to Click All Element Except The Element ( Auto Close Element )
$(document).mousedown(function(e) {
if (!$(e.target).is('.cart-counter,.cart-holders div,.cart-holders ul,.cart-holders li, .cart-holders p,.cart-holders span,.cart-holders a')) {
$('div.cart-holders').fadeOut();
}
})
@lasida
lasida / Facebook Languange Code list php array
Created February 22, 2017 09:10
Facebook Languange Code list Array PHP for Displaying Select Box necessary
<?php
/**
* Facebook Languange Code list Array PHP.
*
* Locales taken from http://www.facebook.com/translations/FacebookLocales.xml
*
* Last Updated: 22/02/2017
*
* @author Lasida Azis
* Inspiration from SVC Invoke
<?php
// Elementor Class
if ( ! defined( 'ABSPATH' ) ) exit;
// This file is pretty much a boilerplate WordPress plugin.
// It does very little except including wp-widget.php
class ElementorRecentProduct {
private static $instance = null;
<?php
// Elementor Class
if ( ! defined( 'ABSPATH' ) ) exit;
// This file is pretty much a boilerplate WordPress plugin.
// It does very little except including wp-widget.php
class ElementorRecentProduct {
private static $instance = null;
@lasida
lasida / functions.js
Last active November 10, 2017 08:45
Ajax View Counter
$(window).load(function() {
$.ajax({
url : kontakin.ajax_url,
type : 'post',
data : {
action : 'add_kontakin_view',
post_id : postID
},
success : function( response ) {
window.location.replace(linkdirection);
@lasida
lasida / gist:254197b630b828f48441ded97c35fea6
Created January 28, 2018 10:42
Sum Value by Id Array Multidimensional
<?php
$data = array(
array( '231', 'http://dalamislam.com/akhlaq/amalan-shaleh/cara-agar-tetap-istiqomah-di-jalan-allah', '1'),
array( '231', 'http://dalamislam.com/akhlaq/amalan-shaleh/cara-agar-tetap-istiqomah-di-jalan-allah/', '2'),
array( '231', 'http://dalamislam.com/akhlaq/amalan-shaleh/cara-agar-tetap-istiqomah-di-jalan-allah/amp', '3'),
array( '21221', 'http://dalamislam.com/akhlaq/amalan-shaleh/cara-agar-tetap-istiqomah', '4'),
array( '1', 'http://dalamislam.com/akhlaq/amalan-shaleh/cara-agar-tetap-istiqomah-di-jalan-allah', '5'),
array( '1', 'http://dalamislam.com/akhlaq/amalan-shaleh/cara-agar-tetap-istiqomah-di-jalan-allah/', '10'),
array( '2', 'http://dalamislam.com/akhlaq/amalan-shaleh/cara-agar-tetap-istiqomah-di-jalan-allah/amp', '15'),
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
const char* ssid = "yourNetworkName";
const char* password = "yourNetworkPassword";
void setup () {
Serial.begin(115200);
WiFi.begin(ssid, password);
@lasida
lasida / data.php
Last active July 9, 2019 08:08
Monitoring Penampung Sampah : Menggunakan WEMOS D1, HTTP, PHP, MYSQL
<?php
include('koneksi.php');
$sql = mysqli_query($conn,"SELECT * FROM tb_tes WHERE id=1");
$data = mysqli_fetch_assoc($sql);
?>
<div id="container">
<div id="empty-space"></div>
<h3 style="text-align: center;margin-top: 10%;">Monitoring Ketinggian Penampung Sampah</h3>
@lasida
lasida / functions.js
Last active December 27, 2019 04:17
WordPress : AJAX
$(document).on('click', '.tour-img, .view-tour', function (e) { //onclick button
$.ajax({
type : "post",
dataType : "json",
url : kmdscrpt.ajaxurl,
data : {
action: "template_tourpackages", //action to Result PHP
post_id : $(this).attr('data-id'), // passing post ID
security: kmdscrpt.security // passing security
},