Skip to content

Instantly share code, notes, and snippets.

View salodev's full-sized avatar

Salomon salodev

View GitHub Profile
@salodev
salodev / privacy.txt
Created February 9, 2024 21:56
Políticas de privacidad de MalvinasWar
Política de privacidad
======================
* Uso de datos personales del móvil
Malvinas War es un juego que no requiere información perosnal para poder jugarse.
No recolecta información de ningún tipo, ni envía a servidor alguno.
* Cambios en el presente documento
Se podrán realizar cambios sin previa notificación. Revisa periódicamente este documento para estar al tanto de sus modificaciones
@salodev
salodev / functionalProgrammingExample.php
Created February 12, 2023 13:23
Este es un ejemplo sencillo de programación funcional y tuberías con php
<?php
function pipe(...$functions): callable {
return function($value) use ($functions) {
foreach($functions as $function) {
$value = $function($value);
}
return $value;
};
}
@salodev
salodev / vh.sh
Created December 15, 2021 11:50
Apache2 Local VirtualHost Generator
#!/bin/bash
templateFile="/etc/apache2/sites-available/template"
read -p "Nombre de host: " host
read -p "Ruta al public ej: /var/www/mi-proyecto/public : " documentRoot
if [[ ! -d $documentRoot ]]; then
echo "La ruta al public {$documentRoot} no existe.\nNo se ha realizado ninguna acción.\n"
exit 1;
fi
@salodev
salodev / context.ts
Last active November 3, 2021 22:43
A fancy 'wich' keyword alternative in TypeScript
// Hello everyone!
//
// I want to bring an idea that I guess.. maybe useful for you.
//
// With no more words, we will ride into the concept.
// Suppose an scenario like following:
let result =
this.a.lot.of.dot.levels.myAim.methodA() +