Skip to content

Instantly share code, notes, and snippets.

View jmeiracorbal's full-sized avatar

Jose Meira jmeiracorbal

  • Spain
  • 09:36 (UTC +01:00)
View GitHub Profile
@aidos-dev
aidos-dev / README.md
Last active December 7, 2025 10:09
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf
@Muetze42
Muetze42 / README.md
Last active October 2, 2025 18:51
Laravel Eloquent Standalone

Using Laravel Eloquent (illuminate/database) standalone

Full Example with migrations

Install

Install package via composer

composer require illuminate/database
@osteel
osteel / posts.yml
Created January 10, 2021 16:18
Example GitHub Action to instal Composer dependencies and run a PHP script
name: Update blog posts
on:
push:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
build:
@fhdalikhan
fhdalikhan / Dockerfile
Last active June 18, 2025 07:09
Dockerfile for PHP 7.4 FPM Alpine
FROM php:7.4-fpm-alpine
WORKDIR /var/www/html
# Setup GD extension
RUN apk add --no-cache \
freetype \
libjpeg-turbo \
libpng \
freetype-dev \
@DanRibbens
DanRibbens / .docker\Dockerfile
Created May 25, 2020 18:06
docker-compose & dockerfile for PHP 7.4, Nginx, PostgreSQL
FROM php:7.4-fpm
# Copy composer.lock and composer.json
COPY ../composer.lock composer.json /var/www/
# Set working directory
WORKDIR /var/www
# Install dependencies
RUN apt-get update && apt-get install -y \
@bigbosst
bigbosst / BackupRotated
Created August 6, 2019 14:09
A simple rotational backup script that will rotate daily, weekly, monthly, and yearly backups.
#!/bin/bash
SRC_DIR="/var/www/html"
BACKUP_DIR="/mnt/backups"
PROJECT_NAME="project"
BACKUP_RETENTION_DAILY=6
BACKUP_RETENTION_WEEKLY=3
BACKUP_RETENTION_MONTHLY=3
BACKUP_RETENTION_YEARLY=0
@shakhmehedi
shakhmehedi / bash_backup_all_mysql_databases.sh
Created September 2, 2016 19:00
Bash scripts to backup all databases in a MySQL server with the option to exclude some databases.
#!/usr/bin/env bash
#This script backups selected databases in local MySQL server
#REQUIREMENTS
##mysqldump gzip
##mysql database has no root password. This script uses 'root' MySQL user without password as no 'root' password is set.
##This is not good practice. User with more restrictive permission should be used.
#set database user
@briceburg
briceburg / Dockerfile.fails
Created March 30, 2016 22:17
docker - example adding www-data user to alpine images
FROM nginx:alpine
# stock verison from php:alpine image
# ensure www-data user exists
RUN set -x \
&& addgroup -g 82 -S www-data \
&& adduser -u 82 -D -S -G www-data www-data
# 82 is the standard uid/gid for "www-data" in Alpine
# http://git.alpinelinux.org/cgit/aports/tree/main/apache2/apache2.pre-install?h=v3.3.2