Skip to content

Instantly share code, notes, and snippets.

View rsenna's full-sized avatar
🏠
Working from home

Roger Senna rsenna

🏠
Working from home
  • Barcelona, Spain
  • 00:19 (UTC +01:00)
  • X @rsenna
View GitHub Profile
@CGamesPlay
CGamesPlay / import.py
Created December 14, 2024 00:58
Migrate Obsidian (or markdown directory) to Anytype markdown import
#!/usr/bin/env python3
# /// script
# dependencies = [
# "mistune==3.0.2",
# ]
# ///
import os
import sys
import hashlib
@pmarreck
pmarreck / comparison-of-shells.md
Last active December 10, 2025 12:01
Comparison of Bash, Elvish, NuShell, Murex, es-shell, fish, xonsh, PowerShell, Oil and Ion shells

(generated by chatgpt 4o and reviewed/edited by claude 3.5 sonnet, YMMV)

| Feature | Bash | Elvish | NuShell | Murex | Es Shell | Fish | Xonsh | PowerShell | Oil | Ion | |----------------------------------|-----------------------------------------------|-----------------------------------------------|----------------------------------------------|----------------------------------------------|----------------------------------------------|----------------------------------------------|----------------------------------------------|----------------------------------------------|-------------------------

@GiovanniGrieco
GiovanniGrieco / Setup-Podman-on-LXC.md
Last active June 18, 2025 19:00
Setup Podman on LXC

Before you start, please NOTE: this guide does not cover rootless containers!

On an hypervisor with LXD installed, create a new container, ensuring that -c security.nesting=true -c security.privileged=true is set:

lxc launch -c security.nesting=true -c security.privileged=true images:fedora/35 my-container

If the container already exists, set this parameter through lxc config:

lxc config set my-container security.nesting=true
lxc config set my-container security.privileged=true

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228 in a MacOS using ZSH.

Based on https://gist.github.com/Neo23x0/e4c8b03ff8cdf1fa63b7d15db6e3860b

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders.

@eggplants
eggplants / ALT-SH.md
Last active September 19, 2025 01:29
List of alternative shell-scripting languages (or shells)

Alternative shell-scripting languages (or shells)

  • sorted by repo name [a-z]

amirbawab/BashClass

BashClass is an Object Oriented Programming language that compiles to BASH 4.4

@davidteren
davidteren / nerd_fonts.md
Last active December 4, 2025 07:16
Install Nerd Fonts via Homebrew [updated & fixed]
@eiriktsarpalis
eiriktsarpalis / Atom.cs
Created June 22, 2019 12:20
Clojure-style atoms for C#
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Atom
{
public class Atom<T> where T : class
{
private T _value;
@timotgl
timotgl / uninstall-razer-synapse.sh
Last active April 16, 2025 13:33
How to fully uninstall Razer Synapse 2 on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) without using Razer's official uninstall tool
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 )
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra)
# without using Razer's official uninstall tool.
# Tested on OS X 10.11.5 in July 2016.
# Edited with additional steps for later OS X versions,
# contributed by commenters on this gist.
# Step 1: In your terminal: stop and remove launch agents
launchctl remove com.razer.rzupdater
@simeonf
simeonf / pex.md
Last active July 5, 2024 06:19
Creating a PEX from a python script

So you want to create a pex that packages your script and its dependencies?

Ok - first to make our script! Call it foo.py:

import requests

if __name__ == '__main__':
  req = requests.get("https://raw.githubusercontent.com/pantsbuild/pex/master/README.rst")
  print req.text.split("\n")[0]
@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active December 10, 2025 04:22
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3