Skip to content

Instantly share code, notes, and snippets.

View francoism90's full-sized avatar
😸
Cuddling the cat

François M. francoism90

😸
Cuddling the cat
View GitHub Profile
@lbssousa
lbssousa / Instructions.md
Last active December 26, 2024 07:06
VSCode + Dev Containers and Toolbx/Distrobox setup for Fedora Silverblue

VSCode + Dev Containers and Toolbx/Distrobox setup for Fedora Silverblue

Steps

If you prefer VSCode Flatpak

  1. Install VSCode Flatpak from Flathub:
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install com.visualstudio.code
@FilBot3
FilBot3 / 00_README.md
Last active December 3, 2024 23:54
Trying to use VSCode from a Flatpak using Podman-Remote to connect to Host to use DevContainers
@gilbitron
gilbitron / CaddyController.php
Created June 16, 2021 10:55
Enabling HTTPS (SSL) for Laravel Sail using Caddy
<?php
# app/Http/Controllers/CaddyController.php
namespace App\Http\Controllers;
use App\Store;
use Illuminate\Http\Request;
class CaddyController extends Controller
{
@starvsion
starvsion / Dockerfile
Created May 21, 2019 03:12
Vessel App Fedora Version (these are files inside docker/app)
# __DIR.'/docker'
FROM fedora:30
RUN useradd -ms /bin/bash -u 1337 vessel
WORKDIR /var/www/html
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN echo "fastestmirror=true" >> /etc/dnf/dnf.conf
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active December 19, 2024 08:02
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@hermanbanken
hermanbanken / Dockerfile
Last active December 9, 2024 10:41
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@servers(['web' => $user.'@'.$host,'localhost' => '127.0.0.1'])
@setup
// Sanity checks
if (empty($host)) {
exit('ERROR: $host var empty or not defined');
}
if (empty($user)) {
exit('ERROR: $user var empty or not defined');
}
@holmberd
holmberd / php-pools.md
Last active December 19, 2024 09:32
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@voluntas
voluntas / sysctl.conf
Created October 14, 2017 13:07 — forked from techgaun/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@dvlden
dvlden / ffmpeg.md
Last active September 25, 2024 20:12
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec