This file contains 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
var allInputs = document.getElementsByTagName("input"); | |
for (var i = 0, max = allInputs.length; i < max; i++){ | |
if (allInputs[i].type === 'checkbox' && allInputs[i].id.endsWith('_8')) | |
allInputs[i].checked = true; | |
} |
This file contains 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 | |
/* | |
* | |
* Customized add to cart button for WooCommerce | |
* © mahdyar.me (hasanpour@mahdyar.me) | |
* | |
* Add this to the end of your template's "functions.php" file (without "<?php" at the begining of this file) | |
* | |
*/ |
This file contains 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 | |
/* | |
* | |
* | |
* | |
* Developed by Mahdyar.me | |
* Contact: hi@mahdyar.me | |
* |
This file contains 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 | |
function validateCardNumber($cardNumber) | |
{ | |
if (empty($cardNumber) || strlen($cardNumber) !== 16) { | |
return false; | |
} | |
$cardToArr = str_split($cardNumber); | |
$cardTotal = 0; | |
for ($i = 0; $i < 16; $i++) { |
This file contains 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
name: Deploy to cPanel | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
FTP-Deploy-Action: | |
name: FTP-Deploy-Action | |
runs-on: ubuntu-latest | |
steps: |
This file contains 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
wir(){ | |
NAME=$(sed 's/ /_/g' <<< "$@") | |
INITIAL=$(echo $NAME | head -c 1) | |
IMDB_ID=$(curl -ks "https://v2.sg.media-imdb.com/suggestion/$INITIAL/$NAME.json" | jq -r '.d[0].id') | |
LINK="https://wir31.site/${IMDB_ID}/" | |
curl -ks "$LINK" | lynx -dump -nonumbers -listonly -stdin | grep -e '.mkv' -e '.mp4' | grep 'http://' | |
} |
This file contains 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
aaxar | |
abadaleh | |
abazar | |
abbas | |
abbasali | |
abbasi | |
abdolali | |
abdolamir | |
abdolghani | |
abdolhamid |
This file contains 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 | |
// It's better to be exported as an environment variable or in a .env file. | |
define("SECRET", "<SECRET>"); | |
$body = file_get_contents("php://input"); | |
// $decodedBody = json_decode(urldecode($body)); | |
if (verifySignature($body) !== false) { | |
// verified |
This file contains 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 | |
namespace App\Rules; | |
use Illuminate\Contracts\Validation\Rule; | |
use Illuminate\Support\Facades\Route; | |
class AllowedUsername implements Rule | |
{ | |
/** |
NewerOlder