Skip to content

Instantly share code, notes, and snippets.

View 0x524c's full-sized avatar

0x524c 0x524c

  • Brazil
  • 04:37 (UTC -03:00)
  • X @0x524c
View GitHub Profile
@0x524c
0x524c / snakeoil.sh
Created December 5, 2020 21:19 — forked from yyuu/snakeoil.sh
Generate snakeoil SSL certificates on Debian
sudo apt-get install ssl-cert
sudo make-ssl-cert generate-default-snakeoil
sudo usermod --append --groups ssl-cert yyuu
ls -l /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.key
@0x524c
0x524c / 1-setup.md
Created August 4, 2021 21:56 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

@0x524c
0x524c / .env
Created October 3, 2021 17:04 — forked from nicosingh/.env
MySQL cluster using docker
MYSQL_ROOT_PASSWORD=rootpass
@0x524c
0x524c / python.sh
Last active January 24, 2022 00:37
Python installation
#!/usr/bin/env bash
#
# This script is for installing python 3.x.x
#
# Copyright (c) 2021 itheo.tech
# MIT License
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@0x524c
0x524c / gcc compiler optimization for arm systems.md
Created January 23, 2022 19:30 — forked from fm4dd/gcc compiler optimization for arm systems.md
GCC compiler optimization for ARM-based systems

GCC compiler optimization for ARM-based systems

2017-03-03 fm4dd

The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.

-mcpu, -march: Defining the CPU type and architecture

These flags can both be used to set the CPU type. Setting one or the other is sufficient.

@0x524c
0x524c / update-ffmpeg-rpi.sh
Created January 25, 2022 00:42 — forked from enzanki-ars/update-ffmpeg-rpi.sh
Install/Update FFmpeg with hardware acceleration on the Raspberry Pi
#!/bin/bash
# Compile and install/update (or install via Apt) FFmpeg Codecs
# Compile and install/update FFmpeg suite
# Compile with hardware acceleration
# Modified from https://retroresolution.com/compiling-ffmpeg-from-source-code-all-in-one-script/
echo "Begining Installation of FFmpeg Suite"
#Update APT Repository
echo "Updating the APT repository information"
# Kernel
kernel=zImage
#initramfs ramdisk.img 0x01f00000
# Audio
dtparam=audio=on
# Camera
#disable_camera_led=1
#gpu_mem=128
@0x524c
0x524c / defrag_ext4_filesystem.md
Created February 4, 2022 03:03 — forked from rmi1974/defrag_ext4_filesystem.md
How to optimize / defrag ext4 filesystem #ext4 #commandlinefu

How to optimize / defrag ext4 filesystem

Make sure the target filesystem is sane

Open up the terminal and run:

sudo fsck.ext4 -y -f -v /dev/<disk/partition>
@0x524c
0x524c / compile-ffmpeg.sh
Last active April 19, 2022 10:12 — forked from wildrun0/compile-ffmpeg.sh
Compiling ffmpeg for Raspberry Pi 4 (script only works fine on RPIOS)
#!/bin/bash
# Note that there's no libdrm because this lib cause errors
sudo apt update -y && sudo apt upgrade -y
sudo apt-get -y install \
autoconf \
automake \
libgstreamer1.0-dev \
@0x524c
0x524c / make_current_arm64_rpi_kernel_debs.sh
Created February 5, 2022 17:04 — forked from satmandu/make_current_arm64_rpi_kernel_debs.sh
Make arm64 deb packages for the offical Raspberry Pi Foundation arm64 kernels + NOW INSTALLS headers package too.
#!/bin/bash -x
# make_arm64_rpi_kernel_debs.sh
# Builds arm64 debian packages from the CURRENT rpi firmware repository kernel which is installed by:
# sudo rpi-update
# This runs on an arm64 host with arm64 compilation tools...
# or with some sort of cross-compilation setup.
# Debs are put in $workdir/build
#
# This will NOT work in Raspbian unless you have an arm64 compilation
# environment setup. Appears to work on