Skip to content

Instantly share code, notes, and snippets.

View skynet-05's full-sized avatar
💭
Available.....just ping!

Rahul skynet-05

💭
Available.....just ping!
View GitHub Profile
@skynet-05
skynet-05 / chmod-400.cmd
Created May 4, 2023 10:10 — forked from jaskiratr/chmod-400.cmd
Set permission of file equivalent to chmod 400 on Windows.
# Source: https://stackoverflow.com/a/43317244
$path = ".\aws-ec2-key.pem"
# Reset to remove explict permissions
icacls.exe $path /reset
# Give current user explicit read-permission
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)"
# Disable inheritance and remove inherited permissions
icacls.exe $path /inheritance:r
@skynet-05
skynet-05 / Pico-Stub\version.json
Created August 18, 2021 05:21
Visual Studio Code Settings Sync Gist
{"version": "1.15.0"}
@skynet-05
skynet-05 / python_systemd.md
Created June 14, 2021 07:10 — forked from ilyasst/python_systemd.md
Run a python script forever using systemd

Run a python script forever

In this section, we are going to show how to run a python script as a systemd service, allowing you to boot it at the start of a Linux machine and to maintain it alive.

Test method: Telegram Bot

We are going to use a very basic Telegram bot in order to test that our script will:

  1. Automatically start when the machine boot
  2. Automatically restart when it crashes/exits for whichever reason
@skynet-05
skynet-05 / Pico-Stub\version.json
Last active May 3, 2021 07:10
Visual Studio Code Settings Sync Gist
{"version": "1.14.1"}
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF5/MDoBEAD2kJb774Gwiy5clThFqEfpLQrxwBE6PEXdxrX+7odyjY1D2944
93yL2E4nl+WYevWYjpiAkfiQCoQvP3ipTaQ6ju2qTAFHLgRWuvUjGX/718TNvzmw
QmpXmVRglU6b6R0gTey5iKaaU4dCj5R6ZPWblLxIMsnDsMipPNBW2yozvmTacqP6
m/x8ItyPCbiJEM75hKi2mrFOQRiBGhm5xTFBFDsMvzgfv/F+fxI25C0+0Hk+3glC
onI/FddsHwp5nYKoKgpcaxYz92JQw30HLk3kBu1Fx30sCgGGHwp6bz8Es0XS9erD
6tWV66k/RjXiXrwpHqetwSM1vg7kdvgzcFHeU+O/AL4AKg8O3vTBgggVM8p1uL9u
bfbboosguGOl09UaaI2WncsS36M6MQTpyEDbMJ5a4EmgXrfkIAY7k5zMkJcXQpSp
KfHJedyL5PrJqbVK03cEeziRnOvwzLzyS1+F/nfrYCBRF33QUEv8QurOVBicmuN5
1. Install minicom: sudo apt install minicom
2. Check if the board is connected: dmesg|grep ttyACM0
3. Connect to board using rshell: rshell --buffer-size=512 -p /dev/ttyACM0
4. To copy files onto the pico: cp filename.py /pyboard/
5. To list the files on the pico: ls /pyboard

Keybase proof

I hereby claim:

  • I am skynet-05 on github.
  • I am notonline (https://keybase.io/notonline) on keybase.
  • I have a public key ASD5eHHHpWsMiczYfneZqPNFmBwluu1FDCWzfyCB1-sM0go

To claim this, I am signing this object: