Skip to content

Instantly share code, notes, and snippets.

View maximilionus's full-sized avatar
🐧

MAXIMILI maximilionus

🐧
View GitHub Profile
@davenewham
davenewham / gist:220850ca51667d559bbe9ded6856fd60
Created February 1, 2022 19:32
Convert video file to telegram webm for animated sticker
ffmpeg -i input_file.mp4 -framerate 30 -c:v libvpx-vp9 -an -vf scale=512:512 -pix_fmt yuva420p output_sticker.webm
@walidamriou
walidamriou / Fix_PlatformIO_Errno_13_Permission_denied_ttyUSB0_with_Linux.md
Created August 26, 2020 12:57
Fix PlatformIO [Errno 13] Permission denied: '/dev/ttyUSB0' with Linux

The problem: " Traceback (most recent call last): File "/home/../.platformio/penv/lib/python3.6/site-packages/serial/serialposix.py", line 265, in open self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK) PermissionError: [Errno 13] Permission denied: '/dev/ttyUSB0'

During handling of the above exception, another exception occurred:

"

@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active June 14, 2024 12:13
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@Log1x
Log1x / debloatNox.md
Last active June 8, 2024 05:23
Debloating & Optimizing Nox

Debloating Nox

Nox, despite being the most feature-filled Android emulator, has a lot of negativity surrounding it due to their antics when it comes to making income off of their program. It is known for running repeated advertisments in the background, calling home and passing along system information (outside of your Android instance) as well as a vast amount of potentially sensitive data in an encrypted payload back to their multitude of servers. With the following preventitive measures, we can stop a majority of this happening as well as greatly improve the overall performance.

  1. Download and Install a fresh copy of Nox. The latest version is fine (for now). If you already have it installed, that is fine too. No need to reinstall.

  2. Enable Root Mode on Nox by clicking the gear icon and then checking the Root Startup box.

  3. Install a new Launcher from the Play Store. ANYTHING but Nox's default. I suggest [Nova Launcher](https://play.google.com/s

@nikhita
nikhita / fedora-firefox-gif-video.md
Created August 6, 2018 05:17
How to get Twitter gifs and short videos working on Firefox on Fedora

How to get Twitter gifs and short videos working on Firefox on Fedora

Note: This is for Fedora 28, however the process should be similar for other recent Fedora versions as well.

  1. Go to https://www.youtube.com/html5 and check if all boxes are checked. If gifs or short videos don't work for you, you mostly do not have H.264 and MSE & H.264.

  2. There are a bunch of repositories you need to setup.

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@amarao
amarao / blame-praise.py
Last active June 14, 2024 16:59
Example of argparse with subparsers for python
#!/usr/bin/env python
import argparse
def main(command_line=None):
parser = argparse.ArgumentParser('Blame Praise app')
parser.add_argument(
'--debug',
action='store_true',
help='Print debug info'
@haskaalo
haskaalo / tarcheatsheet.md
Last active June 17, 2024 06:31
Tar usage / Tar Cheat Sheet

Tar Usage / Cheat Sheet

Compress a file or directory

e.g: tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

  • -c: Create an archive.
  • -z: Compress the archive with gzip.
  • -v: makes tar talk a lot. Verbose output shows you all the files being archived and much.
  • -f: Allows you to specify the filename of the archive.
@k-takata
k-takata / bash-completion-slowness-on-msys2.md
Created May 13, 2015 15:08
Bash-completion is very slow on MSYS2

Bash-completion is very slow on MSYS2

Bash-completion is very slow on MSYS2 when the current user is a domain user. This describes the cause and the solutions.

Cause

Expansion of ~* is very slow when you use a domain user. For example:

@shamil
shamil / mount_qcow2.md
Last active June 17, 2024 17:27
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8