javascript:(function(){var query=prompt('Enter search query:');if(query){var site=window.location.hostname;window.location.href='https://www.google.com/search?q=site:'+site+'+'+encodeURIComponent(query);}})();
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 d'extraction BookPreview/FlipPDFPlusPro vers PDF | |
| // À exécuter dans la console du navigateur | |
| // Builds PDF from JPEG bytes locally — no external libs, no CSP issues. | |
| // based on https://github.com/arthur-mdn/ExtractJSFlipPDFPlusProToPDF/blob/main/script.js | |
| const debug = false; | |
| (async function () { | |
| console.log('Starting extraction...'); |
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 | |
| /** | |
| * Plugin Name: [Forminator] - Custom form submission date format (Rev.1.1) | |
| * Description: This MU Plugin allows the usage of a custom date format for the Submission page | |
| * Author: Anderson Salas @ WPMUDEV | |
| * Task: SLS-3998 | |
| * Author URI: https://premium.wpmudev.org | |
| * License: GPLv2 or later | |
| */ |
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
| Updated list / Nov 17 - 2024 | |
| Posting - https://posting.sh/ - Terminal Based | |
| ATAC - https://github.com/Julien-cpsn/ATAC | |
| Rest.nvim - https://github.com/rest-nvim/rest.nvim | |
| Slumber - (uses tui client) https://slumber.lucaspickering.me/ |
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
| // injects the script in the body of the document. | |
| // returns a promise that gets resolves once the script has been loaded in the document | |
| export const injectScript = (url, document = window.document) => { | |
| const script = document.createElement('script'); | |
| script.src = url; | |
| script.type = 'text/javascript'; | |
| script.async = true; | |
| const body = document.getElementsByTagName('body')?.[0] ?? null; | |
| if (body === null) { |
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
| ## Pre-requisite: You have to know your last commit message from your deleted branch. | |
| git reflog | |
| # Search for message in the list | |
| # a901eda HEAD@{18}: commit: <last commit message> | |
| # Now you have two options, either checkout revision or HEAD | |
| git checkout a901eda | |
| # Or | |
| git checkout HEAD@{18} |
dir 'e:\' -recurse -force | Where-Object { $_.LinkType -and ($_.FullName -notlike '*\.pnpm-store*' -or $_.FullName -notlike '*\.git*') } | Select-Object FullName, LinkType, Target#windows #powershell #filesystem
...instead of sprintf or str_replace[^1] in #php #string #template #pitfall
$strTemplate = "My name is :name, not :name2.";
$strParams = [
':name' => 'Dave',
'Dave' => ':name2 or :password', // a wrench in the otherwise sensible input
':name2' => 'Steve',
':pass' => '7hf2348', // sensitive data that maybe shouldn't be here#dto #data-transfer-object #php
Based on https://github.com/spatie/data-transfer-object/tree/v2
$object = [
'parameters' => [
[
'name' => 'foo',
'type' => 'text',#js
- Open network tab in #dev-tools
- Right click on request and copy as
fetch - Add the
.then()part to thefetch()and send the request - Result will be inserted in browser main window
fetch("https://teeeeeessssstttttt.com/ticket/", {NewerOlder