Skip to content

Instantly share code, notes, and snippets.

View rusty-snake's full-sized avatar
🔮
What happened to the penguin?

rusty-snake

🔮
What happened to the penguin?
View GitHub Profile
@rusty-snake
rusty-snake / noprofile.md
Last active November 8, 2021 08:52
A firejail profile which is weaker than --noprofile. Only for debugging purpose.
We couldn’t find that file to show.
@rusty-snake
rusty-snake / build-firejail-rpm.sh
Last active August 13, 2021 09:58
Build a firejail rpm and install it.
#!/bin/bash
# Copyright © 2020,2021 rusty-snake
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@rusty-snake
rusty-snake / firecfg.patch
Last active July 20, 2021 08:46
Alternative firecfg .desktop cleaning | Use >> https://github.com/rusty-snake/firecfg.py <<
--- a/src/firecfg/main.c
+++ b/src/firecfg/main.c
@@ -486,8 +486,5 @@ int main(int argc, char **argv) {
if (arg_debug)
printf("%s %d %d %d %d\n", user, getuid(), getgid(), geteuid(), getegid());
- // fix .desktop files in ~/.local/share/applications directory
- fix_desktop_files(home);
-
return 0;
@rusty-snake
rusty-snake / systemd_cmds.md
Created December 21, 2019 16:55
systemd commands

systemd commands

systemd

CMD DESC
busctl Introspect the bus.
coredumpctl List or retrieve coredumps from the journal.
@rusty-snake
rusty-snake / firejail_blacklist_violation_notify.sh
Last active October 20, 2024 07:32
firejail_blacklist_violation_notify.sh - Notifications on blacklist violations, useful for debugging
#!/usr/bin/env bash
# Copyright © 2019,2020 rusty-snake
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
@rusty-snake
rusty-snake / firejail_seccomp_notify.sh
Last active October 20, 2024 07:32
firejail_seccomp_notify.sh - Notification on Seccomp violations, useful for debugging
#!/usr/bin/env bash
# Copyright © 2019,2020 rusty-snake
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
@rusty-snake
rusty-snake / firejail-check-blacklist.rs
Last active October 20, 2024 07:38
Check for every noblacklist in firejail profiles a corresponding blacklist exists
/*
* Copyright © 2019 rusty-snake <[email protected]>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@rusty-snake
rusty-snake / Auto.java
Created February 4, 2019 19:49
OOP implementierung für ein Auto in Rust, Python und Java.
public class Auto {
private String marke;
private String farbe;
private int ps;
public Auto(String marke, String farbe, int ps) {
this.marke = marke;
this.farbe = farbe;
this.ps = ps;
}
@rusty-snake
rusty-snake / prompt.py
Last active July 2, 2019 09:39
The difference between a system language and a scripting language.
#!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2019 rusty-snake (https://github.com/rusty-snake) <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@rusty-snake
rusty-snake / Headless_R-Pi_setup.md
Created December 19, 2018 18:36
How to set up a headless Raspberry Pi with Raspbian under Linux.

How to set up a headless Raspberry Pi with Raspbian under Linux.

This is a short descrieption for setup a headless (without Monitor/Display) Raspberry Pi with Raspbian under Linux using the shell.

  • First download a raspbian image from here and verify the sha256sum.
  • Secondly write the image to an microSD-Card. unzip RASPBIAN_IMAGE | sudo dd of=/dev/mmcblk0 bs=4M conf=fsync status=progress.
    • Replace RASPBIAN_IMAGE with the image that you downloaded before.
    • Replace /dev/mmcblk0 with your device name.
    • bs=4M make it faster, but maybe it causes problems, if it does, skip it.
  • conf=fsync can also causes problems, if you skip it, don't forget to run sudo sync after the command has finished.