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
| function searchItem(query, obj = window, maxDepth = 10) { | |
| const seen = new WeakSet(); | |
| const results = []; | |
| function isMatch(key, value) { | |
| if (String(key).includes(query)) return true; | |
| if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { | |
| return String(value).includes(query); | |
| } | |
| return false; |
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
| // Remove duplicates and merge multiple Kindle clipping files | |
| // Usage: deno run -A remove-duplicates.ts MyKindleClippings1.txt MyKindleClippings2.txt | |
| type ClippingData = { | |
| date: string; | |
| content: string; | |
| endLocation: string; | |
| }; | |
| async function removeDuplicates(filePaths: string[]) { |
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
| echo 'Hello' |
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
| // Cancel all the Stripe subscriptions supplied from a CSV export | |
| const fs = require('fs') | |
| const neatCsv = require('neat-csv') | |
| const moment = require('moment') | |
| const stripe = require('stripe')('sk_live_xxx') | |
| // subscriptions.csv is the full export of subs from the stripe billing dashboard | |
| fs.readFile('./subscriptions.csv', async (err, data) => { | |
| if (err) return console.error(err) |
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
| <progress id='progressbar' style='display: none' value="0"></progress> | |
| <div id="editor" ></div> | |
| <script> | |
| let editor = new Quill('#editor') | |
| function uploadImageToImgurAndReplaceSrc($image) { | |
| var imageBase64 = $image.attr('src').split(',')[1]; |
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
| const Twit = require('twit') | |
| const T = new Twit({ | |
| consumer_key: 'xxx', | |
| consumer_secret: 'xxx', | |
| access_token: 'xxx', | |
| access_token_secret: 'xxx', | |
| }) | |
| const Airtable = require('airtable') |
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
| ### General | |
| Node 8+ | |
| Use of promises, async, await | |
| Use of JS "standard" styling https://github.com/standard/standard | |
| Use of arrow functions | |
| Versionning: Git + GitHub | |
| ### Backend | |
| Express.JS |
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
| # install brew | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| # full update | |
| brew update && brew upgrade && brew cask upgrade && sudo softwareupdate -i -a && brew cleanup | |
| # full install | |
| brew install yt-dlp subliminal node postgresql@16 oven-sh/bun/bun | |
| brew install --cask imageoptim linear-linear slack beeper cursor 1password spotify telegram raycast visual-studio-code qbittorrent iina tableplus homebrew/cask-versions/firefox-developer-edition |
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
| Striped does not communicate any data to external servers, and directly connects to Stripe's servers to fetch your data. | |
| Your Stripe API key is stored on your device. | |
| Contact | |
| [email protected] |
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
| L'application Fod utilise votre caméra pour scanner les produits et en récuperer les informations de la base de données OpenFoodFacts. | |
| A part les numéros des codes barres scannés, aucunes données ne sont envoyées à un ou des serveur(s) extérieurs. | |
| Contact | |
| [email protected] |
NewerOlder