Skip to content

Instantly share code, notes, and snippets.

@tyjak
tyjak / regions-dom.geojson
Created April 25, 2025 07:39
Régions avec DOM
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
module https://gist.github.com/tyjak/fc9b3cfc6d616fdc5df1718729d44d0f
go 1.20
package bodyreplace
import (
"bytes"
"io"
"net/http"
"regexp"
)
type Config struct {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tyjak
tyjak / tw_add
Last active March 24, 2024 14:18
#!/bin/bash
#
# The script automates task creation in Taskwarrior using the title of the
# active window. It allows for tag extraction from the window title, annotation
# creation from text selection, and Taskwarrior option customization through
# command-line arguments. Errors are logged for debugging purposes, and
# notifications are provided for task creation success and failure.
#
# Exemple : task_add -a -t +cal due:2025-04-04T1700
#
#!/bin/bash
# This script serves as a Taskwarrior hook, automating the generation and
# sending of iCal events via email when tasks with specific criteria are
# modified or created. It extracts task details, such as title, due date, and
# annotations, then constructs an iCal event and sends it as an email
# attachment using Mutt. Optionally, it can append event details to a specified
# file. The script enhances Taskwarrior's functionality by seamlessly
# integrating task management with calendar events, streamlining task tracking
# and scheduling processes.
@tyjak
tyjak / twbymail
Last active March 7, 2024 17:18
creates Taskwarrior tasks from unread emails fetched via IMAP, using a YAML configuration file for settings
#!/bin/python
"""
This script allows you to automatically create tasks in Taskwarrior based on unread
emails fetched from an IMAP server. It fetches unread emails from a specified IMAP
server, parses the subject of each email, and creates a corresponding task in
Taskwarrior.
The script reads configuration parameters, such as IMAP server details, email address,
password command, IMAP folder, default project for tasks, and default tags for tasks,
#!/bin/sh
# dmenu scripts to search in history and bookmark or in default vimb search engine
# mark the window where searched was launch
i3-msg 'mark websearch'
# go to web marked if possible
i3-msg '[con_mark="web"] focus'