Skip to content

Instantly share code, notes, and snippets.

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

Abolfazl abolix

🏠
Working from home
View GitHub Profile
@host-anshu
host-anshu / verify_paypal_webhook_signature.py
Last active November 22, 2022 15:56
Verify PayPal Webhook Signature using the REST APIs and the PayPal-Python-SDK
"""
This snippet could be used to verify PayPal webhooks
PayPal docs isn't very clear about API verification mechanism. And am afraid neither
is the SDK.
BASIC CONCEPT: Your webhook_event in the body of verification request be in the same
order you have received from PayPal or else your verification fails.
EXTRA TIP IF USING DRF: Don't use request.DATA as it mutates the order of the request
@samanzamani
samanzamani / gist:7ab3046ae1f94348d852bde959349f92
Last active September 28, 2025 04:08
لیست کامل تمام شهرها و استان های ایران
[
{
"province": "اردبیل",
"cities": [
"اردبیل",
"اصلاندوز",
"آبی بیگلو",
"بیله سوار",
"پارس آباد",
"تازه کند",
@joashp
joashp / openssl_encrypt_decrypt.php
Created September 4, 2015 15:59
Simple PHP encrypt and decrypt using OpenSSL
<?php
/**
* simple method to encrypt or decrypt a plain text string
* initialization vector(IV) has to be the same when encrypting and decrypting
*
* @param string $action: can be 'encrypt' or 'decrypt'
* @param string $string: string to encrypt or decrypt
*
* @return string
*/