Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bun
import { addDays, differenceInDays, getDay, getWeek, isAfter, isSameDay, isWeekend, parseISO, startOfWeek } from 'date-fns@^4.1.0';
import { styleText } from 'node:util';
const WEEK_STARTS_ON = 1; // Monday
const totalDaysToWork = 80;
const startDate = parseISO('2025-07-14');
const startWeekDate = startOfWeek(startDate, { weekStartsOn: WEEK_STARTS_ON });
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Products</title>
<style>
*,
*::before,
*::after {
@floriangosse
floriangosse / 00_aws-enhancements.user.css
Last active September 30, 2025 14:11
Make AWS a bit more beautiful
/* ==UserStyle==
@name AWS - Enhancements
@namespace github.com/openstyles/stylus
@version 0.2.4
@author Florian Goße
@homepageURL https://gist.github.com/floriangosse/0f7f0813d0245bc8bd7dc2aeb619c9b3
@updateURL https://gist.github.com/floriangosse/0f7f0813d0245bc8bd7dc2aeb619c9b3/raw/00_aws-enhancements.user.css
==/UserStyle== */
@-moz-document regexp("^https:\\/\\/(?:.+\\.)?signin\\.aws\\.amazon\\.com\\/oauth([\\/?#].*)?") {
@floriangosse
floriangosse / 00_hackernews-enhancements.user.css
Last active August 20, 2024 07:00
Make Hacker News a bit more beautiful
/* ==UserStyle==
@name Hacker News - Enhancements
@namespace github.com/openstyles/stylus
@version 0.1.0
@author Florian Goße
@updateURL https://gist.github.com/floriangosse/52fd26e8f9b87d5c5f90b58d91fef1a2/raw/00_hackernews-enhancements.user.css
==/UserStyle== */
@-moz-document domain("news.ycombinator.com") {
body {
@floriangosse
floriangosse / 00_linkedin-premium-hider.user.css
Last active April 23, 2025 10:46
Hide LinkedIn Premium Links
/* ==UserStyle==
@name LinkedIn - Premium Hider
@namespace github.com/openstyles/stylus
@version 0.3.1
@author Florian Goße
@updateURL https://gist.github.com/floriangosse/37a3d3904dd5dcb3a40de90d09ead5e5/raw/00_linkedin-premium-hider.user.css
==/UserStyle== */
@-moz-document domain("linkedin.com") {
#root header:has(a[href*="://www.linkedin.com/feed/?nis=true"]) ul > li > a[href*="://www.linkedin.com/premium/"] {
@floriangosse
floriangosse / view-formatted-extended-web-logs-in-less.sh
Created July 26, 2024 10:04
View formatted Extended Web Logs in less
cat extended-web-logs.log | tail -n +2 | sed 's/^#[a-zA-Z:]*[ \t]*/#/g' | column -t | less --header 1 -S
@floriangosse
floriangosse / Gmail - Mark Issue Mails from Sentry as important.gs
Created April 22, 2024 07:56
[Google Apps Scripts] Gmail: Mark Issue Mails from Sentry as important
function run() {
while (true) {
const threads = GmailApp.search('{from:@getsentry.com from:@*.getsentry.com} -is:important ', 0, 100);
const importantThreads = threads.filter(function (thread) {
const messages = thread.getMessages();
return messages.some(function (message) {
return !!message.getHeader('X-Sentry-Project');
});
});
@floriangosse
floriangosse / Gmail - Mark archived as read.gs
Last active April 22, 2024 07:57
[Google Apps Script] Gmail: Mark archived as read
function markArchivedAsRead() {
var threads = GmailApp.search('label:unread -label:inbox');
GmailApp.markThreadsRead(threads);
};
@floriangosse
floriangosse / Gmail - Auto-Archive.gs
Last active April 22, 2024 07:56
[Google Apps Script] Gmail: Auto-Archive
var LABEL = 'Auto-Archive';
var OLDER_THEN = '2d';
function archiveIfHasLabelAndOlderEnough() {
var label = GmailApp.getUserLabelByName(LABEL);
// Get all threads which are labeled for auto archive
var threads = GmailApp.search('label:inbox label:' + LABEL + ' older_than:' + OLDER_THEN);
// Process threads
import { chromium } from 'playwright';
async function main() {
const browser = await chromium.launch({
headless: false,
});
const page = await browser.newPage();
await page.goto('https://www.google.com');