Skip to content

Instantly share code, notes, and snippets.

View marcaurele's full-sized avatar
🏔️
I may be slow to respond.

Marc-Aurèle Brothier marcaurele

🏔️
I may be slow to respond.
View GitHub Profile
@marcaurele
marcaurele / Dockerfile
Created December 31, 2024 13:45
Dockerfile to build ghostty
FROM debian:testing
ENV ZIG_VERSION="0.13.0"
RUN apt-get update && \
apt-get install --yes --no-install-recommends --no-upgrade libgtk-3-dev libadwaita-1-dev git curl xz-utils ca-certificates
ADD https://ziglang.org/download/$ZIG_VERSION/zig-linux-x86_64-$ZIG_VERSION.tar.xz /
RUN tar -xf zig-linux-x86_64-$ZIG_VERSION.tar.xz && \
@marcaurele
marcaurele / Redirector.json
Created January 18, 2024 21:24
Config for Redirector Firefox plugin
{
"createdBy": "Redirector v3.5.3",
"createdAt": "2024-01-18T21:23:34.230Z",
"redirects": [
{
"description": "Twitter",
"exampleUrl": "https://twitter.com/majek04/status/1334811330033946625",
"exampleResult": "https://nitter.unixfox.eu/majek04/status/1334811330033946625",
"error": null,
"includePattern": "https://twitter.com/*",
@marcaurele
marcaurele / VollaPhone.md
Last active September 23, 2023 20:50
Volla Phone

AWS cli Cheat Sheet

AMI

Get the Linux 2023 images for x86_84 sorted by the latest:

aws ec2 describe-images --filters "Name=name,Values=al2023-ami-*" Name=architecture,Values=x86_64 Name=virtualization-type,Values=hvm Name=root-device-type,Values=ebs --query 'sort_by(Images, &CreationDate)[-7:]'
@marcaurele
marcaurele / terraform-via-docker-aws-vault.md
Created April 8, 2022 11:39
Run Terraform via docker using aws-vault to provide AWS variables

To run terraform via a container while providing the aws-vault env variables:

docker run --rm \
    -v `pwd`:/workspace \
    -w /workspace/terraform \
    --env-file <(aws-vault exec default -- env | grep AWS) \
    --env TF_WORKSPACE=production \
    hashicorp/terraform:1.1.6 \
    init/plan/apply
@marcaurele
marcaurele / Dockerfile
Last active November 3, 2021 20:12
pyenv setup under Ubuntu 21.04
FROM ubuntu:21.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y \
# Tools for the pyenv installer script
curl \
git \
# Tools to build python from source
@marcaurele
marcaurele / exif-xmp.sh
Created June 15, 2021 14:20
Read photo XMP tags
exiv2 -PXkyct $*
@marcaurele
marcaurele / gist:96957102802669248fc39860f85d2f5c
Created May 12, 2021 09:25
One liner for release history between 2 branches
git log --pretty=oneline --abbrev-commit master..staging
@marcaurele
marcaurele / ocr-my-pdf.sh
Last active October 3, 2023 07:47
OCR PDF inside a directory
# Option 1
find . -printf '%p\n' -name '*.pdf' -exec ocrmypdf '{}' '{}' \;
# Option 2
for f in *; do echo $f; ocrmypdf -l fra $f $f; done
@marcaurele
marcaurele / cloud.rego
Created March 24, 2021 09:04
Example REGO rule
package httpapi.authorization.project
import input
# Very important!, default to deny!
default allow_reading = false
default allow_editing = false
default allow_processing = false
role_allow_processing = {"MANAGER", "OWNER"}