Skip to content

Instantly share code, notes, and snippets.

View temsool's full-sized avatar
🏠
Working from home

Mira temsool

🏠
Working from home
View GitHub Profile
@temsool
temsool / custom-select.js
Last active August 9, 2021 13:48
Custom Select / jQuery SCSS
if(jQuery('select.hidden-select').length){
initCustomSelect();
}
function initCustomSelect(){
// Iterate over each select element
jQuery('select.hidden-select').each(function () {
// Cache the number of options
@someguy9
someguy9 / disable-wordpress-admin-new-user-notification.php
Created May 14, 2020 19:05
Disable the WordPress new user email notification sent to the site admin
<?php
//Disable the new user notification sent to the site admin
function smartwp_disable_new_user_notifications() {
//Remove original use created emails
remove_action( 'register_new_user', 'wp_send_new_user_notifications' );
remove_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );
//Add new function to take over email creation
add_action( 'register_new_user', 'smartwp_send_new_user_notifications' );
add_action( 'edit_user_created_user', 'smartwp_send_new_user_notifications', 10, 2 );
@harslannet
harslannet / woocommerce-tr-fields.php
Last active September 8, 2021 08:58
Woocommerce ödeme sayfasında bireysel müşteriler için T.C. numarası kurumsal müşteriler için vergi numarası alanını ekleme.
<?php
/*
* Çalışma koşulu şu şekilde;
* Ödeme ekranına geldiğinde müşteri varsayılan olarak T.C. alanını görecek ama araştırdığım ve öğrendiğim kadarıyla sadece 5000 TL ve üstü siparişler için T.C. numarası zorunluymuş bu yüzden zorunlu olmayacak.
* Zorunlu olmamasına rağmen eğer müşteri buraya yanlış bir T.C. yazarsa doğrulamadan geçecek ve eğer yazmak istemiyorsa boş bırakması için uyarı mesajı gelecek
* Eğer firma adına fatura isterse Kurumsal Sipariş Checkbox'ını işaretleyerek T.C. alanı gizlenecek ve vergi dairesi ile vergi numarası alanı gözükecek ve bu alanlar zorunlu olacak
* Not: T.C. numarası ve Vergi Numarası doğrulamadan geçiyor.
* Eksikler: T.C. Numarasını boş bırakabildikleri için veri tabanına o sipariş için 11111111111 yazdırmayı başaramadım. ->
* Ama 147. satırdaki kod sipariş ekranında bu bilgiyi gösteriyor, bunu nasıl yaparız bilen varsa yazsın ->
* Aslında 'default' => 11111111111 ile veritabanına bunu yazdırabilirim ama bunu set edince sipariş ekranında bu numaranın gözükmesi hoşuma git
@acollierr17
acollierr17 / yt2d.md
Last active February 7, 2023 00:09 — forked from Godimas/yt2d.md
YouTube to Discord via IFTTT (Updated 2020)

Navigate to: Twitter via IFTTT, Twitter via Zapier, Reddit or GitHub.

YouTube to Discord via IFTTT and webhook

You just posted a video. You want everyone on your server to know this, eh?

Step 1 - Register on IFTTT

  1. Go to the IFTTT website and create an account (if you don't already have one).

Step 2 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send YouTube videos.
@ontiuk
ontiuk / woocommerce-select2-selectwoo-remove
Last active May 17, 2023 13:55
Woocommerce Remove Select2 / SelectWoo
// Add to your theme's functions.php file. De-queues Select2 styles & scripts. Useful to keep Boostrap form control formatting
/**
* Remove Woocommerce Select2 - Pre WC 3.2.1-ish
*/
function woo_dequeue_select2() {
if ( class_exists( 'woocommerce' ) ) {
wp_dequeue_style( 'select2' );
wp_deregister_style( 'select2' );
@shivendra14
shivendra14 / Illustrator_Scale_Artboard_and_Artwork.jsx
Created September 17, 2017 14:19
Script to scale up Illustrator Assets
#target Illustrator
/*
Revision-1
Author: Shivendra Agarwal
Year: 2017
Title: Script to scale-up artwork and artboard above 15 Mpixel
*/
if ( app.documents.length > 0 )
alert("ERROR: \n Close all documents before running this script." );
@yasinkuyu
yasinkuyu / paribu_api
Last active November 15, 2022 20:02
Paribu Bitcoin Rates
Paribu.com - Türkiye'nin Bitcoin Borsası
2021 (update)
Api endpoint
https://v3.paribu.com/app/markets/btc-tl?interval=1000
Ticker
@tadeha
tadeha / sample-telegram-bot.php
Created September 6, 2017 10:51
This is a sample Telegram bot written in PHP.
<?php
/*
* Sample Telegram Bot Source Code
*
* @author Tadeh Alexani
* @version 1.00, 2017-09-06
* PHP
*/
@igorbenic
igorbenic / desc.php
Last active February 21, 2024 21:32
How to Programmatically Change Yoast SEO Open Graph Meta | http://www.ibenic.com/programmatically-change-yoast-seo-open-graph-meta
<?php
function change_yoast_seo_og_meta() {
add_filter( 'wpseo_opengraph_desc', 'change_desc' );
}
function change_desc( $desc ) {
// This article is actually a landing page for an eBook
if( is_singular( 123 ) ) {