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 / .gitignore
Last active October 20, 2024 13:36
Bypass seccomp-bpf based memory-deny-write-execute with `READ_IMPLIES_EXEC`
/target
@rusty-snake
rusty-snake / seccomp_load_debug.rs
Created August 11, 2024 11:54
LD_PRELOAD library to export the seccomp-bpf filter when it is loaded.
// SPDX-License-Identifier: MIT
/*
* Copyright © 2023,2024 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 / 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 October 20, 2024 07:31
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: