Skip to content

Instantly share code, notes, and snippets.

View jawdatls's full-sized avatar
💭
I may be slow to respond.

Jawdat Sobh jawdatls

💭
I may be slow to respond.
View GitHub Profile
@jawdatls
jawdatls / date_update.sql
Created November 2, 2015 07:02
mysql query to update only month in date
UPDATE `tbl`
SET `date` = DATE_ADD(`date`, INTERVAL -1 MONTH)
WHERE MONTH(`date`) = 11
@jawdatls
jawdatls / example.js
Last active November 5, 2015 07:45
jQuery hide function with trigger hide event
$('#priceContainer').on('hide',function(){
$('#price').val("0.0");
});
$('#priceContainer').hideWithEvent();
/*Filter styles*/
.saturate {-webkit-filter: saturate(3); filter: saturate(3);}
.grayscale {-webkit-filter: grayscale(100%); filter: grayscale(100%);}
.contrast {-webkit-filter: contrast(160%); filter: contrast(160%);}
.brightness {-webkit-filter: brightness(0.25); filter: brightness(0.25);}
.blur {-webkit-filter: blur(3px); filter: blur(3px);}
.invert {-webkit-filter: invert(100%); filter: invert(100%);}
.sepia {-webkit-filter: sepia(100%); filter: sepia(100%);}
.huerotate {-webkit-filter: hue-rotate(180deg); filter: hue-rotate(180deg);}
.rss.opacity {-webkit-filter: opacity(50%); filter: opacity(50%);}
if( null == username_exists( $email_address ) ) {
// Generate the password and create the user
$password = wp_generate_password( 12, false );
$user_id = wp_create_user( $email_address, $password, $email_address );
// Set the nickname
wp_update_user(
array(
@jawdatls
jawdatls / shape-grid-calculation.js
Created May 10, 2018 09:24
Shape Grid Calculation
// Base
let w = width; // shape width
let h = height; // shape height
let r = row; // grid row start by 0
let c = column; // grid column start by 0
// Square
let left = r * w; // transform left position
let top = j * h; // transform top position
@jawdatls
jawdatls / instagram-exporter.js
Last active September 30, 2020 11:50
Instagram Exporter - run the script into console tab of inspector of browser then use the methods of instagram object in console after scroll down some posts.
/**
* Instagram Media Exporter
*
* @author: Jawdat Sobh
*/
(function(){
let _list = {}
window.addEventListener('scroll',function(event){
setTimeout(() => {
document.querySelectorAll('.FFVAD').forEach((e) => {