Skip to content

Instantly share code, notes, and snippets.

View rene-d's full-sized avatar
🤘
Let There Be Rock

rene-d rene-d

🤘
Let There Be Rock
  • Thales
  • France
View GitHub Profile
# http://nginx.org/en/docs/http/ngx_http_autoindex_module.html
autoindex on;
@rene-d
rene-d / uptobox.sh
Last active July 1, 2022 03:35
Commandline downloader for uptobox.com
#!/usr/bin/env bash
# how to find the token: https://docs.uptobox.com/?javascript#how-to-find-my-api-token
token=
dl()
{
file_code=$1
file_code=${file_code##https://uptobox.com/}
@rene-d
rene-d / bench.sh
Last active March 31, 2020 04:00
bench_pc
#!/bin/bash
docker run --rm -v $PWD:/a -w /a buildpack-deps:buster cc bench_pc.c $*
time docker run --rm -v $PWD:/a debian:buster-slim /a/a.out
time docker run --rm -v $PWD:/a --privileged debian:buster-slim /a/a.out
#!/usr/bin/env python3
# extract base64 <data> in XML plist
# use `plistutil` or `plist -convert xml1` to convert from binary
import xml.sax
from sys import argv
from base64 import b64decode
import re
#!/usr/bin/env python3
# _ ____ _____ ______ ____ __
# / \ | _ \| ___/ ___\ \ / /\ \/ /
# / _ \ | | | | |_ | | _ \ \ / / \ /
# / ___ \| |_| | _|| |_| | \ V / / \
# /_/ \_\____/|_| \____| \_/ /_/\_\
# rene-d 2020
# références:
#!/usr/bin/env bash
# https://en.wikipedia.org/wiki/ANSI_escape_code
print_colors()
{
# Print column headers.
echo -ne "\033[0m"
printf "%-4s " '' ${bgs[@]}
@rene-d
rene-d / tgv_speed.sh
Created October 21, 2020 06:53
Show TGV speed in the Bash prompt
_tgv_speed()
{
LANG=C printf "%.f km/h" $(curl -s "https://wifi.sncf/router/api/train/gps" | jq -cr ".speed * 3.6")
}
PS1='\[\033[01;32m\]\u@\h\[\033[0;93m $(_tgv_speed)\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '
@rene-d
rene-d / api.sh
Created October 21, 2020 07:04
Some SNCF Wi-Fi endpoints
#!/bin/sh
curl -sO "https://wifi.sncf/assets/js/adminVersion.json"
mkdir -p api/train api/food api/videos api/configuration api/connection api/analytics api/bar api/travel api/chat
mkdir -p api/sync/faq api/sync/rules
curl -s "https://wifi.sncf/router/api/train/gps" > api/train/gps.json
curl -s "https://wifi.sncf/router/api/train/graph" > api/train/graph.json

L'énigme de la crypte

Lien

Category : Crypto

Points : 200

Description

@rene-d
rene-d / README.md
Last active January 25, 2021 22:31

Le Polyglotte

Lien

Category : Stegano

Points : 150

Description

Nous avons intercepté un fichier top secret émanant d'Evil Country, il est très certainement en rapport avec leur programme nucléaire. Personne n'arrive à lire son contenu.