Skip to content

Instantly share code, notes, and snippets.

View Paper-Folding's full-sized avatar

Paper-Folding

  • China
View GitHub Profile
@emxsys
emxsys / raspberry_pi_script_as_service.md
Last active May 19, 2025 12:19
How to run a python script as a service in Raspberry Pi - Raspbian Jessie

How to Run a Script as a Service in Raspberry Pi - Raspbian Jessie

By: Diego Acuña

Original Article: http://www.diegoacuna.me/how-to-run-a-script-as-a-service-in-raspberry-pi-raspbian-jessie/

A pretty common task when using this device, is to run some script (for example a python script) as a service in the operating system so it can start on boot, stop and restart using systemctl and more. In this post I'm going to explain how to set a little script as a service using Raspbian Jessie in a Raspberry Pi.

Example Python Script

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 26, 2025 07:13
Conventional Commits Cheatsheet
@destan
destan / ParseRSAKeys.java
Last active March 31, 2025 23:14
Parse RSA public and private key pair from string in Java
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active July 17, 2025 18:57
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4