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
| #!/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 }); |
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
| <!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 { |
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
| /* ==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([\\/?#].*)?") { |
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
| /* ==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 { |
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
| cat extended-web-logs.log | tail -n +2 | sed 's/^#[a-zA-Z:]*[ \t]*/#/g' | column -t | less --header 1 -S |
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 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'); | |
| }); | |
| }); |
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 markArchivedAsRead() { | |
| var threads = GmailApp.search('label:unread -label:inbox'); | |
| GmailApp.markThreadsRead(threads); | |
| }; |
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
| 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 |
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
| 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'); |
NewerOlder