Run this in the console:
document.querySelectorAll('span.Details-content--closed').forEach((e)=>{e.click()})
From the creator of: unzip.dev 🚀
import fs from "fs"; | |
import fse from "fs-extra"; | |
import path from "path"; | |
import { promisify } from "util"; | |
import { exec } from "child_process"; | |
const execAsync = promisify(exec); | |
function chunkArray(array, chunkSize) { | |
const chunks = []; |
Run this in the console:
document.querySelectorAll('span.Details-content--closed').forEach((e)=>{e.click()})
From the creator of: unzip.dev 🚀
/* | |
This script helps fix links that have a prefix whitespace (sometimes when copying from google). | |
Also it allows to add a ?ref=yoursite to all links in the newsletter issue. | |
Worked with the latest ghost version up to now (Feb 2024) | |
*/ | |
const GhostAdminAPI = require("@tryghost/admin-api"); | |
const path = require("path"); |
["yourdomain.com", "your2nddomain.com"...] |
import urllib | |
# ... | |
DB_URL = config('DATABASE_URL') # Get from your config | |
db_props = urllib.parse.urlparse(DB_URL) | |
db_name = db_props.path | |
db_user = db_props.username | |
db_password = db_props.password | |
db_host = db_props.hostname | |
db_port = db_props.port |
// If you ever so fancy, you might want to check: unzip.dev | |
export const tableTest = ( | |
test: jest.It, | |
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |
cases: any[][], | |
testFn: CallableFunction | |
) => { | |
test.each(cases)(`${testFn.name}(%s) should be %s`, async (input, output) => { | |
const asyncFn = testFn.constructor.name == 'AsyncFunction'; |
<?php | |
//Exec time class | |
/* | |
Example: | |
Time::start('functionToTest'); | |
functionToTest(); | |
Time::p(); | |
Time::t(); | |
*/ | |
class Time{ |
from re import sub, search | |
from decimal import Decimal | |
# Not production ready | |
def convert(m): | |
r = 1.0 | |
if "£" in m: | |
r = 1.28 # Make sure to check this (conversion rate between pounds and usd) | |
z = 0 |
#!/usr/bin/env python3 | |
# pylint: disable=invalid-name | |
"""mbox-extract-attachments3 - Extract attachments from mbox files. | |
Good companion for Google Takeout https://takeout.google.com/settings/takeout | |
Modified by http://github.com/kellerza from | |
https://github.com/PabloCastellano/pablog-scripts/ | |
- Python3 & linter errors | |
- New Filenames |