Skip to content

Instantly share code, notes, and snippets.

View mayocca's full-sized avatar
💪
Compilin'

Matias Yocca mayocca

💪
Compilin'
View GitHub Profile
@ageis
ageis / openpgp-card-guide.md
Last active June 14, 2024 07:10
Quick GPG Smartcard Guide
@rosswintle
rosswintle / Stats.php
Created May 17, 2017 08:42
Simple Laravel Service Container/Provider example
<?php
// This is the Stats class I wanted to create. It lives in app/Stats.php, but could be anywhere that the AutoLoader will recognise it
namespace App;
use App\Action;
use Carbon\Carbon;
/**
@gea0
gea0 / arch-rpi-64-full-disk-encryption-ssh-unlock.md
Last active March 24, 2024 14:36
Tutorial for installing a 64-bit Arch Linux ARM system on the Raspberry Pi 3B+, with an encrypted root filesystem, and the option to remotely unlock it via a pre-boot SSH daemon.

Arch Linux ARM 64 on Raspberry Pi 3 B+ With Full Disk Encryption And SSH Unlock: 2018 Edition

There are multiple ways to get a full disk encrypted arch linux system on raspberry. In this tutorial, we will install a 64-bit arch linux armv8 system, using dropbear as ssh server for remote pre-boot unlocking of the root filesystem. However, it will still be possible to unlock and use the pi as usual, with a keyboard and monitor. We will also create an unencrypted partition in the installation process, usable as a rescue system.

Differences to the 32-bit arch linux arm version:

  • probably better performance
  • can run 64-bit software
  • comes without the proprietary video-driver blobs
@poing
poing / laravel_facades.md
Last active May 14, 2024 12:36
Laravel Facades

Understanding Facades in Laravel

What's a Facade?

The Laravel explination, shown below is confusing.

Facades provide a "static" interface to classes that are available in the application's service container. Laravel ships with many facades which provide access to almost all of Laravel's features. Laravel facades serve as "static proxies" to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods.

Many examples use Cache::get('key') to demonstrate how a Facade works. Comparing the following code to the utility that a Facade provides.

@V-Juarez
V-Juarez / Entorno de Desarrollo para php usando Docker.md
Last active May 9, 2024 23:45
Configuración de docker, php y nginx

Entorno de Desarrollo para php usando Docker 🐳

Quieres aprender php, pero las configuraciones te han abrumado y el deseo de aprender van mermando. No, no detengas tu aprendizaje, siempre existe una solución a los problemas. Instalar php, configurar un servidor web en Windows es muy sencillo, en Linux y macOS es otra situación. Debes conocer sobre la terminal, un editor de código, vim, nano, ser avanzado... y mucho más.

La herramienta que vamos a utilizar y que permite trabajar con php, un servidor web y la terminal es Docker.

Docker: Es una plataforma de software que permite crear, probar e implementar aplicaciones rápidamente.

Docker-compose: Es una herramienta para definir y ejecutar aplicaciones; es multicontenedor que permite simplificar el uso de Docker a partir de archivos YAML, de esta forma es más sencillo generar contendores que se relacionen entre sí, conectarlos, habilitar puertos, volúmenes, etc.