Skip to content

Instantly share code, notes, and snippets.

View gabrielgbs97's full-sized avatar
🎯
Focusing

Gabriel Barceló Soteras gabrielgbs97

🎯
Focusing
View GitHub Profile
@gabrielgbs97
gabrielgbs97 / duplicates.py
Last active May 10, 2020 17:35 — forked from tfeldmann/duplicates.py
Fast and recursive duplicate file finder written in python3. It finds duplicated files in a whole directory tree. It is not memory aware, if there are A LOT (tested successfully with thousands) of files it .may be shut down by OOM killer
#!/usr/bin/env python
"""
Fast duplicate file finder.
Usage: duplicates.py <folder> [<folder>...]
Based on https://stackoverflow.com/a/36113168/300783
Modified for Python3 with some small code improvements.
"""
import os
import sys
@mmasaki
mmasaki / iperf.service
Last active August 14, 2023 19:42
systemd service unit for iperf
# /etc/systemd/system/iperf.service
[Unit]
Description=iperf server
After=syslog.target network.target auditd.service
[Service]
ExecStart=/usr/bin/iperf -s
[Install]
WantedBy=multi-user.target
@DraTeots
DraTeots / ComPort over Network.md
Last active July 13, 2024 13:54
ComPort over Network
@developius
developius / README.md
Last active July 14, 2024 15:45
Setup SSH keys for use with GitHub/GitLab/BitBucket etc

Create a new repository, or reuse an existing one.

Generate a new SSH key:

ssh-keygen -t rsa -C "your_email@example.com"

Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings (https://github.com/settings/keys).

Test SSH key:

@nickjacob
nickjacob / systemd-prblm.service
Last active March 17, 2023 16:11
execute arbitrary bash code/variable substitution in systemd units
[Unit]
Description=Demonstrate Bash
[Service]
ExecStartPre=/usr/bin/bash -c "/usr/bin/systemctl set-environment MYVAR=$(( 2 + 2 ))"
ExecStart=/usr/bin/echo "2 + 2 = ${MYVAR}"