Skip to content

Instantly share code, notes, and snippets.

@titanism
titanism / how-to-list-paypal-subscriptions-and-billing-agreements-recurring-payments-endpoint-api-workaround-hack-fix.md
Created January 24, 2023 19:04
How to list all PayPal subscriptions and billing agreements and recurring ids API retrieve fetch all

How to list all PayPal subscriptions and billing agreements and recurring ids API retrieve fetch all

  1. Go to https://www.paypal.com/billing/subscriptions.

  2. Open Devtools and run the following script:

const arr = [];

const interval = setInterval(function() {
@rengler33
rengler33 / scrape_with_logs.py
Last active February 8, 2025 04:09
How to Capture Network Traffic When Scraping with Selenium & Python
# see rkengler.com for related blog post
# https://www.rkengler.com/how-to-capture-network-traffic-when-scraping-with-selenium-and-python/
import json
import pprint
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
capabilities = DesiredCapabilities.CHROME
@scottopell
scottopell / fix_exfat_drive.md
Last active April 28, 2025 01:04
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

If Disk Utility is unable to repair, consider trying this:

  1. In Disk Utility, ensure that the drive is not mounted, eject it if it is mounted.
  2. Use diskutil list to find the right drive id.
  3. You want the id under the IDENTIFIER column, it should look like disk1s1
  4. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  5. -d is debug so you'll see all your files output as they're processed.
@glennkarlsen
glennkarlsen / LaravelCookieDecrypter.php
Created October 13, 2015 07:35
Decrypt laravel_session outside of the Laravel app. This is just a proof of concept, cleanup and extend to your needs.
<?php
class LaravelCookieDecrypter {
/**
* The encryption key.
*
* @var string
*/
protected $key = 'YOUR LARAVEL .ENV APP KEY';
@tott
tott / ip_in_range.php
Created November 27, 2013 22:46
php check if IP is in given network range
/**
* Check if a given ip is in a network
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed
* @return boolean true if the ip is in this range / false if not.
*/
function ip_in_range( $ip, $range ) {
if ( strpos( $range, '/' ) == false ) {
$range .= '/32';
}
@ziadoz
ziadoz / awesome-php.md
Last active May 8, 2025 07:37
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.