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 / seccomp_init_btree.rs
Last active June 3, 2023 11:56
LD_PRELOAD library to change the default optimization level of libseccomp to build btree optimized filters.
// SPDX-License-Identifier: MIT
/*
* Copyright © 2023 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
@rusty-snake
rusty-snake / cu2ub.py
Last active November 24, 2021 23:59
ClearURLs to µBlock origin converter
# Copyright © 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:
#
# The above copyright notice and this permission notice shall be included in all
#!/usr/bin/python3
# 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 / powersafe-undo.sh
Created September 23, 2021 08:01
Tweak battery usage on a Linux with GNOME desktop. powertop needs to be installed.
#!/bin/bash
# Copyright © 2020 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 / xdg-open.c
Last active January 27, 2024 08:05
xdg-open.c – A xdg-open drop-in wrapper to make xdg-open work nicely with firejail.
/*
* Copyright © 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 / maintenance-status.md
Last active May 30, 2022 20:12
Proposal to easily show the maintenance status of a project.

maintenance status

maintenance-status: passively-maintained version: 3.1.0

Proposal to easily show the maintenance status of a project.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be

@rusty-snake
rusty-snake / 2-dimensional-array.bash
Created January 2, 2021 10:38
two dimensional arrays in bash
#!/bin/bash
# Copyright © 2020 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 / 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: