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
#!/bin/bash | |
which mutool &> /dev/null || (echo "mutool is not installed" && exit 1) | |
which convert &> /dev/null || (echo "imagemagick is not installed" && exit 1) | |
which zip &> /dev/null || (echo "zip is not installed" && exit 1) | |
if [ "$1" = "" ] | |
then | |
echo "Usage: $0 File.pdf" | |
exit |
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
// Facebook is fascist network AND makes it super hard to delete all your photos! | |
// Here is a script that will automatically click on buttons | |
// to delete all your photos one by one from your Facebook account. | |
// | |
// 1. Click on the "Photos" tab of your Facebook profile | |
// 2. Click on the pencil on the right-top corner of a photo | |
// 3. Note the label of the button to delete a photo | |
// 4. Click on this button | |
// 5. Note the label of the confirm button | |
// 6. Change the following three labels to match the real buttons labels, |
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
// Instagram doesn't allow to select all your posts, or all your comments, etc. to delete them. | |
// You can only select them one by one. This is slow as hell. | |
// Use this to select all the photos, comments, etc. | |
// 1. Open this page: https://www.instagram.com/your_activity/interactions/likes/ | |
// 2. click on the "select" button | |
// 3. Press the F12 key to open the developer tools | |
// 4. open the console tab in the developer tools | |
// 5. copy-paste the following code in the command prompt of the console and press enter | |
// 6. Click on Delete/Unlike button |
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
// ==UserScript== | |
// @name Se souvenir des champs remplis sur 12Train.com | |
// @namespace http://tampermonkey.net/ | |
// @version 2025-01-07 | |
// @description Mémorise les dates, heures, gares et passagers, pour aller plus vite. | |
// @author BohwaZ | |
// @match https://www.12train.com/ | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=12train.com | |
// @grant none | |
// ==/UserScript== |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Javascript insert images into markdown with resize before upload</title> | |
</head> | |
<body> | |
<pre><h2>This demo shows how you can easily add images to a markdown textarea</h2> | |
You can drag and drop, paste or select images. Files other than images are discarded. | |
The images are resized on the client side and inserted as Markdown inside the text. |
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 | |
function ignore_spaces_regexp(string $r) { | |
return str_replace(' ', '\s*', $r); | |
} | |
function parse_reason(string $path) | |
{ | |
$src = file_get_contents($path); | |
$out = new \stdClass; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Javascript OffscreenCanvas image resize demo</title> | |
</head> | |
<body> | |
<h3>Select a file below to display its thumbnail</h3> | |
<input type="file" id="file" /> |
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 | |
$domain = 'mydomain.tld'; | |
if (get_ssl_certificate_expiry($domain) < 30) { | |
throw new \Exception('Certificate expires in less than 30 days!'); | |
} | |
function get_ssl_certificate_expiry(string $domain): ?int | |
{ |
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
#!/bin/bash | |
which mutool &> /dev/null || (echo "mutool is not installed" && exit 1) | |
which convert &> /dev/null || (echo "imagemagick is not installed" && exit 1) | |
which zip &> /dev/null || (echo "zip is not installed" && exit 1) | |
if [ "$1" = "" ] | |
then | |
echo "Usage: $0 File.pdf" | |
exit |
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
#!/usr/bin/php | |
<?php | |
// Note: this code does not contain any DRM removal, DRM removal is made by https://notabug.org/NewsGuyTor/DeDRM_tools-LCP | |
// | |
// Install steps: | |
// Debian/Ubuntu/Mint: apt install php-cli python3 python3-cryptodome python3-lxml zip unzip | |
// | |
// How to use? | |
// Just run: php lcp_download.php FILE.LCPL PASSWORD | |
// A new FILE_decrypted.epub will be created in the same directory |
NewerOlder