Skip to content

Instantly share code, notes, and snippets.

View vincelwt's full-sized avatar
🧨
Focusing

Vincelwt vincelwt

🧨
Focusing
View GitHub Profile
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;
@vincelwt
vincelwt / remove-clippings-duplicates.ts
Last active April 23, 2023 20:19
Remove duplicates & merge KindleClippings.txt
// 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[]) {
@vincelwt
vincelwt / test
Created January 7, 2021 00:17
Test
echo 'Hello'
@vincelwt
vincelwt / cancelAll.js
Created April 15, 2020 14:48
Scripts to migrate all subscriptions between two Stripe accounts
// 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)
@vincelwt
vincelwt / quill_image_upload.html
Last active July 10, 2019 14:25
Quill upload image, with drag and drop + progress bar
<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];
@vincelwt
vincelwt / BufferAirtable.js
Last active February 4, 2019 19:11
Free alternative to Buffer based on Airtable and Webtask.io
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')
@vincelwt
vincelwt / SaaS_tech_2019
Last active January 19, 2019 20:30
SaaS_tech_2019
### 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
@vincelwt
vincelwt / macsheet
Last active June 30, 2024 14:24
Mac quick reinstall
# 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
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]
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]