This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/local/lsws/admin/misc | |
./admpass.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$('input.number-filter,.number-filter [type="number"],.number-filter [type="tel"]').on("keydown contextmenu drop", function(event) { | |
const valid = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "ArrowRight", "Backspace", "ArrowLeft", "ArrowUp", "ArrowDown"]; | |
if (!valid.includes(event.key)) { | |
event.preventDefault(); | |
} | |
}) | |
$('.persian-filter input[type*="text"],.persian-filter textarea, input.persian-filter').on("keydown contextmenu drop", function(event) { | |
const valid = ["الف", "ب", "پ", "ت", "ث", "ج", "چ", "ح", "خ", "د", "ذ", "ر", "ز", "ژ", "س", "ش", "ص", "ض", "ط", "ظ", "ع", "غ", "ف", "ق", "ک", "گ", "ل", "م", "ن", "و", "ه", "ی", "َ", "ُ", "ِ", "ّ", "ۀ", "آ", "ـ", ",", "،", "ريال", "ٍ", "ٌ", "ً", "ة", "ؤ", "؛", "إ", "أ", "ء", " ", "ArrowRight", "Backspace", "ArrowLeft", "ArrowUp", "ArrowDown"]; | |
if (!valid.includes(event.key)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var inputNumberElite = document.querySelectorAll('input[type="number"]'); | |
for (var i = 0, len = inputNumberElite.length; i < len; i++) { | |
inputNumberElite[i].addEventListener("keypress", function(evt) { | |
if (evt.which != 8 && evt.which != 0 && evt.which < 48 || evt.which > 57) { | |
evt.preventDefault(); | |
} | |
}) | |
} | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$car_list = array ( | |
0 => '550 ام جی MG ', | |
1 => 'گریت وال H2هاوال', | |
2 => 'گریت وال M4هاوال', | |
3 => '۲۰۵SLX', | |
4 => '۲۰۶', | |
5 => '۲۰۷', | |
6 => '۲۰۷ صندوق دار', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add a Formatted Date to the WordPress REST API JSON Post Object | |
*/ | |
add_action('rest_api_init', function () { | |
register_rest_field( | |
'post', | |
'formatted_date', | |
array( | |
'get_callback' => function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//remove checkbox | |
input[type=checkbox]~label:after, input[type=checkbox]~span:after,input[type=checkbox]~label:before, input[type=checkbox]~span:before{ | |
all:''; | |
} | |
#checkBoxInputs { | |
visibility: hidden; | |
} | |
//add image to input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( class_exists( 'CSF' ) ) { | |
$prefix = 'my_framework'; | |
CSF::createOptions( $prefix, array( | |
'menu_title' => 'MyFramework', | |
'menu_slug' => 'my-framework', | |
'menu_icon' => 'dashicons-star-filled', | |
'framework_title' => 'MyFramework' | |
) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* x = hash lenght | |
*/ | |
substr(md5(openssl_random_pseudo_bytes(20)), $x); | |