Skip to content

Instantly share code, notes, and snippets.

View yasircs4's full-sized avatar
๐ŸŽฏ
Focusing

Yasir Najeeb yasircs4

๐ŸŽฏ
Focusing
View GitHub Profile
@yasircs4
yasircs4 / get all links from username page in tiktok
Created October 4, 2024 16:31
get all links from username page in tiktok
class MaisraHelper
{
/**
* Convert a multi-dimensional array into a single-dimensional array.
* @param $arr
* @param $out
* @return array
*/
static public function arrayFlatten($arr, $out = array())
// open this url with your account open: https://www.flipkart.com/account/orders?link=home_orders
// then copy pasta this code in your console
const items = document.getElementsByClassName('_1_SN5_');
const totolOrders = Array.from(items).reduce((accumulator, currentValue) => {
const price = parseInt(currentValue.innerText.replace('โ‚น', '') );
if(isNaN(price)) return accumulator; // avoid free order
return accumulator + price;
@yasircs4
yasircs4 / gist:df2fa0eaf864ddeb597b4e0ab552a2d2
Last active July 18, 2022 05:51
Strings (EN, AR) of OTP verification code
ar: :ุฅุฐุง ู„ู… ุชุตู„ูƒุŒ ุฌุฑุจ ุนุจุฑ
en: If you don't get it, try:
ar: ุนุจุฑ ุฑุณุงู„ุฉ ูˆุงุชุณุงุจ
en: Via WhatsApp message
ar: ุฅุณุชู„ู… ุงู„ุงู†
en: Receive Now
ar: SMSุฅุนุงุฏุฉ ุฅุฑุณุงู„
<div class='post-view'>
<span class='icon ion ion-eye'></span>
<span><?php print wp_statistics_pages('total', '', get_the_ID()); ?></span>
</div>
@yasircs4
yasircs4 / Islamic Hijri Months
Last active October 4, 2019 09:45
ุงู„ุฃุดู‡ุฑ ุงู„ู‡ุฌุฑูŠุฉ The Islamic calendar is the religious calendar used by Muslims to determine the proper days to observe religious events such as Ramadan, attend hajj and celebrate other holidays.
// @link https://pollylingu.al/ar/en/lessons/1138
const months = [
{ ar: 'ู…ูุญูŽุฑูŽู‘ู…', en: 'muharram',},
{ ar: 'ุตูŽููŽุฑ', en: 'safar',},
{ ar: 'ุฑูŽุจููŠู’ุนู ุงู„ุฃูŽูˆู‘ู„', en: 'rabi al-awwal',},
{ ar: 'ุฑูŽุจููŠู’ุนู ุงู„ุซูŽู‘ุงู†ููŠ', en: 'rabi al-thani',},
{ ar: 'ุฌูŽู…ูŽุงุฏููŠ ุงู„ุฃูŽูˆู‘ู„', en: 'jumadi al-awwal',},
{ ar: 'ุฌูŽู…ูŽุงุฏููŠ ุงู„ุซูŽู‘ุงู†ููŠ', en: 'jumadi al-thani',},
{ ar: 'ุฑูŽุฌูŽุจ', en: 'rajab',},
#default-captcha-domainchecker {
text-align: right;
}
ul.top-nav {
float: left;
}
section#footer .back-to-top {
float: right;
}
@yasircs4
yasircs4 / Cleaning post type meat_post from wp_postmeta table
Created March 11, 2019 05:15
Cleaning post type meat_post from wp_postmeta table
-- @link https://www.smarthomebeginner.com/clean-wp-commentmeta-wp-postmeta/
-- Here too, we first select the postmeta
-- where is: post id is equal AND post_type equal 'wp-rest-api-log'
SELECT * FROM wp_postmeta pm LEFT
JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID = pm.post_id AND wp.post_type = 'wp-rest-api-log';
-- this get 3013629
-- all wp_postmeta 3023115
linking WhatsApp
https://stackoverflow.com/questions/21935149/sharing-link-on-whatsapp-from-mobile-website-not-application-for-android
https://faq.whatsapp.com/en/general/26000030
https://wa.me/whatsappphonenumber/?text=urlencodedtext
https://api.whatsapp.com/send?phone=whatsappphonenumber&text=urlencodedtext
@yasircs4
yasircs4 / Broken Image Handling
Created December 8, 2016 08:49
jQuery when Error Do same things
// @link https://css-tricks.com/snippets/jquery/better-broken-image-handling/
// Replace source
$('img').error(function(){
$(this).attr('src', 'missing.png');
});
// Or, hide them
$("img").error(function(){
$(this).hide();