Skip to content

Instantly share code, notes, and snippets.

View Dreamfarer's full-sized avatar

Gianluca Dreamfarer

  • Switzerland, Aargau
  • 19:36 (UTC +02:00)
View GitHub Profile

Linux File Permissions Tutorial

In Linux, file permissions dictate who can read, write, or execute a file or directory.

Understanding File Permissions

To view file permissions, use the ls -l command, which lists the contents of a directory along with their permissions. Each entry is preceded by a string representing the file type and permission settings.

  • The first character in the string represents the file type:

iptables Parameters

  • -p (--protocol):

    • Specifies the protocol for the rule (e.g., tcp, udp, icmp, or all for any protocol).
  • -s (--source):

    • Specifies the source IP address or network (e.g., 192.168.1.1 or 192.168.1.0/24).
  • -d (--destination):

  • Specifies the destination IP address or network.

@Dreamfarer
Dreamfarer / davinci-resolve-rotate-project-upon-export.md
Created December 1, 2023 13:25
How to Rotate Your DaVinci Resolve Project Upon Export

How to Rotate Your DaVinci Resolve Project Upon Export

First and foremost, it's important to note that DaVinci Resolve 18 currently does not offer a straightforward method to rotate your entire project upon export. Therefore, I am presenting a free third-party solution using the command-line version of ffmpeg.

In this usage example, ffmpeg changes only the metadata, which means your export will not be re-encoded, and you will not lose any quality.

Please avoid workarounds such as inserting your horizontal timeline into a new timeline with a vertical aspect ratio, or re-encoding the final export with tools like HandBrake. These methods will lead to a loss in quality.

Prerequisites

After downloading ffmpeg from here, unzip it and copy ffmpeg.exe to your preferred location.

@Dreamfarer
Dreamfarer / pypi-upload.md
Last active December 1, 2023 13:27
How to Publish Your Python Package to PyPI

How to Publish Your Python Package to PyPI

Uploading your Python package to PyPI allows other users to download and use it with pip install.

1. Adjust Package Structure

Ensure your package has a structure similar to this. This is a basic structure but can vary based on specific needs.

your_package_name/
    src/
 your_package_name/