Skip to content

Instantly share code, notes, and snippets.

View eric-glb's full-sized avatar

Éric eric-glb

  • France
  • 19:30 (UTC +02:00)
View GitHub Profile
@lilianmallardeau
lilianmallardeau / raspi-reset
Created October 30, 2023 00:47
raspi-reset
#!/bin/bash
BS=64M
DISK_ID=0x7788c428
ROOT_DEV=/dev/mmcblk0
BOOTFS_BACKUP=${ROOT_DEV}p3
BOOTFS_TARGET=${ROOT_DEV}p1
ROOTFS_BACKUP=${ROOT_DEV}p2
ROOTFS_TARGET=${ROOT_DEV}p4
if [ $EUID -ne 0 ]; then
@sebastiancarlos
sebastiancarlos / less-horizontal.bash
Last active September 6, 2023 09:06
The less command... now with horizontal scrolling too!
# All my gist code is licensed under the terms of the MIT license.
# Video demo: https://www.youtube.com/watch?v=lSOVozD7Iio
### Add this to your .bashrc
export LESS="--RAW-CONTROL-CHARS --quit-if-one-screen --clear-screen --tilde"
# version of less that scrolls
alias less="less --chop-long-lines --status-column --rscroll='>'"
@Grub4K
Grub4K / snotify
Last active August 8, 2023 07:13
Small bash notification panel helper
#!/usr/bin/env bash
show_help() {
cat << EOF
${1}
USAGE:
snotify log [MODULE] MESSAGE
Log a message to the notifications panel
snotify enable [HEIGHT]
@sebastiancarlos
sebastiancarlos / show_notifications.bash
Last active July 23, 2024 08:43
Show notifications in your terminal
# All my gist code is licensed under the terms of the MIT license.
# Video demo: https://www.youtube.com/shorts/WVyqVkGYb4k
# Add this somewhere in ~/.bashrc
# write_message
# - write a message on the lower right corner of the terminal
function write_message () {
if [[ "$#" -eq 0 ]]; then
@sebastiancarlos
sebastiancarlos / bash-killring-viewer.sh
Last active August 23, 2023 11:58
Bash killring visualizer - Script to view the killring in Bash
# All my gist code is licensed under the terms of the MIT license.
# Video demo: https://www.youtube.com/watch?v=Yat95AAV5k4
# from https://unix.stackexchange.com/a/217390/569343
# write provided text to the terminal input
# (does not work in subshells)
# - There are some weird errors when I remove the 2>/dev/nulls, but I don't
# even know how to begin to fix them.
function write_to_input () {
@sebastiancarlos
sebastiancarlos / grepdist.sh
Last active August 5, 2023 13:57
Grepdist - Print the number of matches in each 10% section of a file
#!/usr/bin/env bash
# All my gist code is licensed under the terms of the MIT license.
# GREPDIST
# Print the number of matches in each 10% section of the file
#
# Example with grep:
# $ grep -c 'Napoleon' war_and_peace.txt
# 576
#!/usr/bin/env perl
use Mojolicious::Lite -signatures;
use Mojo::File;
use Mojo::Util qw(getopt);
use Pod::Usage;
use version 0.77;
my $VERSION = "0.01";
@Webreaper
Webreaper / docker-compose.yml
Last active June 22, 2024 15:53
Sample Docker-compose file which shows how to set up Sonarr, Radarr, Prowlarr, Lidarr, QBittorrent and a VPN container so that all all traffic from the containers is routed through the VPN. Also includes Plex and get_iplayer containers, which are not routed through the VPN.
# Docker compose to set up containers for all services you need:
# VPN
# Sonarr, Radarr, Lidarr, Qbittorrent
# Non-VPN
# Plex, get_iplayer
# Before running docker-compose, you should pre-create all of the following folders.
# Folders for Docker State:
# /volume1/dockerdata. - root where this docker-compose.yml should live
# /volume1/dockerdata/plex - Plex config and DB
# /volume1/dockerdata/sonarr - Sonarr config and DB
@XlogicX
XlogicX / games.md
Last active June 23, 2024 10:26
List of Boot Sector Gamers

Boot Sector Games

A list of playable boot sector games, most of which are on github. Fun to play, great to learn from. There are also many cool non-booting boot sectors out there that aren't games (so more like demos), but this page is just reserved to interactive boot sectors / games. This list is also not complete, but not on purpose, it is a best effort collection of games, so if you know of any fun boot sector games, please contribute.

This page lists a collection of 31 games spanning several authors: nanochess, me, daniel-e, shikhin, JulianSlzr, XanClic, QiZD90, darkvoxels, guyhill, w-shackleton, egtzori, VileR, ish_works, franeklubi, queso_fuego, franeklubi, Jethro82, waternine9, tevoran, palma3k, taylor-hartman. peterferrie should also be mentioned as he has touched a lot of these games.

TetrOS

https://github.com/daniel-e/tetros

Tetris Clone. Full color, no score. This was one of the older boot sector games out there. ![tetros](https://gist.github.com/assets/1570856/3a0d1023-cbe6-4b4d-

@Hakky54
Hakky54 / openssl_commands.md
Last active July 23, 2024 15:29 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl