Skip to content

Instantly share code, notes, and snippets.

@ngregoire
ngregoire / README.txt
Last active April 6, 2024 04:33
Matplot script used to generate timelines
The script requires Python3 and the packages `numpy`, `pandas` and `matplotlib`.
It accepts a input file compatible with Mermaid (cf `bb.data`) and generates a PNG file.
The tag `<br/>` is supported, so that a label can be displayed on several lines.
I use the font `Humor Sans`, that can be installed via `apt install fonts-humor-sans`.
@ngregoire
ngregoire / BurpExtender.kt
Created June 4, 2021 15:25
Simple Burp extension using performAction()
package burp
@Suppress("unused") // Remove IDE warning, as this class will be used by burp anyway
class BurpExtender : IBurpExtender, ISessionHandlingAction {
private lateinit var cb : IBurpExtenderCallbacks
override fun registerExtenderCallbacks(callbacks: IBurpExtenderCallbacks) {
val extensionName = "A basic Kotlin template"
@ngregoire
ngregoire / pdf-grep
Last active December 15, 2023 01:17
Grep through PDF files
#!/bin/bash
# Three arguments: ROOT_DIR, PATTERN, OPTIONS
# Search below $ROOT_DIR for PDF files matching $PATTERN
# $OPTIONS is passed to pdfgrep (ex: grep-pdf . 'some words' -h -C5)
# ROOT_DIR
if [ -z "$1" ]; then
echo "! Argument ROOT_DIR is needed!"
@ngregoire
ngregoire / dl-twitter-video
Created April 6, 2020 17:59
Shell script downloading videos embedded in tweets
#!/bin/bash
# Usage: $0 TWEET_URL <DEST_FILE>
# If the second parameter is omitted, the video is saved to a timestamped file
DLWD_URL=https://www.savetweetvid.com/fr/downloader
TWEET_URL=$1
DEST_FILE=$2
if [ "$TWEET_URL" = "--help" ] || [ "$TWEET_URL" = "-h" ]
@ngregoire
ngregoire / .zshrc
Last active April 6, 2020 18:04
Efficiently open files from the CLI (using xdg-open and fasd)
# Add this line to your .bashrc / .zshrc
# The 'o' script (cf below) must be in your $PATH
# 'fasd' (cf https://github.com/clvv/fasd) must be in your $PATH too
alias oo='fasd -a -e o'
# Now use 'oo criteria<TAB>' (iterate through matches) or simply 'oo' (list entries)
# Given that 'fasd' is a requirement, maybe have a look at the 'zz' alias