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 / touch-to-move.py
Last active July 2, 2019 09:39
ev3dev: python3-ev3dev2: A pogramm to steer a robot with two touch-sensors.
#!/usr/bin/env python3
#
# MIT License
#
# Copyright (c) 2018 rusty-snake (https://github.com/rusty-snake) <print_hello_world+License@protonmail.com>
#
# 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
@rusty-snake
rusty-snake / watchout.py
Last active July 2, 2019 09:39
ev3dev: python3-ev3dev2: A pogramm to avoid barriers.
#!/usr/bin/env python3
#
# MIT License
#
# Copyright (c) 2018 rusty-snake (https://github.com/rusty-snake) <print_hello_world+License@protonmail.com>
#
# 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 / chess_8_queens.py
Last active July 2, 2019 09:44
python script to solve the Eight queens puzzle
#!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2018 rusty-snake (https://github.com/rusty-snake) <print_hello_world+License@protonmail.com>
#
# 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 / orage-bell.zsh
Created December 16, 2018 12:17
orage-bell - a script to display reminders.
#!/usr/bin/zsh
# MIT License
#
# Copyright (c) 2018 rusty-snake (https://github.com/rusty-snake) <print_hello_world+License@protonmail.com>
#
# 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.
@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) <print_hello_world+License@protonmail.com>
#
# 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 / 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 / firejail-check-blacklist.rs
Last active August 1, 2019 14:22
Check for every noblacklist in firejail profiles a corresponding blacklist exists
/*
* Copyright © 2019 rusty-snake <print_hello_world+License@protonmail.com>
*
* 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 / firejail_seccomp_notify.sh
Last active October 22, 2020 10:36
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_blacklist_violation_notify.sh
Last active October 22, 2020 10:34
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