Skip to content

Instantly share code, notes, and snippets.

View ojgarciab's full-sized avatar
👨‍👩‍👧‍👦
Busy for family reasons

Óscar García ojgarciab

👨‍👩‍👧‍👦
Busy for family reasons
View GitHub Profile
@ojgarciab
ojgarciab / README.md
Created April 24, 2024 06:48
Activar la búsqueda del historial con las teclas Re Pág (page down) y Av Pág (page up)

En el archivo /etc/inputrc aparecen estas líneas comentadas:

# alternate mappings for "page up" and "page down" to search the history
# "\e[5~": history-search-backward
# "\e[6~": history-search-forward

Para descomentarlas basta con teclear:

sed -i -re 's/^# ?(.*: ?history-search-.*)$/\1/g' /etc/inputrc
@ojgarciab
ojgarciab / install-docker.sh
Created September 15, 2023 12:28 — forked from nathzi1505/install-docker.sh
Docker and Nvidia Docker installation in Ubuntu 20.04 LTS
# WARNING : This gist in the current form is a collection of command examples. Please exercise caution where mentioned.
# Docker
sudo apt-get update
sudo apt-get remove docker docker-engine docker.io
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker
docker --version
@ojgarciab
ojgarciab / README.md
Created September 7, 2023 12:35
Secuencia para superar puzle del nivel de Guardian Tales
  • Abajo
  • Izquierda
  • Arriba
  • Arriba
  • Derecha
  • Diagonal arriba/izquierda
@ojgarciab
ojgarciab / Código.ps1
Created June 16, 2023 12:25
Crear y usar copias "shadow" para acceder a archivos en uso
# Documentación:
# https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa394428(v=vs.85)
# Creamos la copia
$shadow = (Get-WmiObject -List Win32_ShadowCopy).Create("C:\\", "ClientAccessible")
$shadow2 = Get-WmiObject Win32_ShadowCopy | Where-Object { $_.ID -eq $shadow.ShadowID }
$dispositivo = $shadow2.DeviceObject + "\\"
cmd /c mklink /d C:\shadowcopy "$dispositivo"
# Acceso a los datos desde C:\shadowcopy
@ojgarciab
ojgarciab / autologin.conf
Last active June 15, 2023 14:53
Debian 11 text mode autologin
# /etc/systemd/system/getty@tty1.service.d/autologin.conf
# Tested on Debian 11
[Service]
ExecStart=
# Replace 'user' with the username of your choice to enable automatic login
ExecStart=-/sbin/agetty --noclear --autologin user %I $TERM
[
{
"id": 1,
"video": "video1.mp4",
"img": "imagen1.jpg",
"url": "pruebas1"
},
{
"id": 2,
"video": "video2.mp4",
{
"content": [
{
"type": "TYPE",
"availableHostnames": [
"host1",
"host2",
"host3",
"host4"
]
@ojgarciab
ojgarciab / php-error-logstash.conf
Created June 28, 2022 10:33 — forked from kamermans/php-error-logstash.conf
Logstash parser for PHP's error_log to combine multline stack traces / errors into one event
input {
stdin {
codec => multiline {
pattern => "^\[%{MONTHDAY}-%{MONTH}-%{YEAR} %{TIME} %{TZ}\]"
negate => true
what => "previous"
auto_flush_interval => 10
}
type => "php-error"
}
@ojgarciab
ojgarciab / README.md
Last active May 26, 2022 22:02
Instalación de PHP 5.6 en Oracle Linux 8

Instalación de PHP 5.6 en Oracle Linux 8

dnf install -y oracle-epel-release-el8
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf install -y php56-php-cli php56-php-mysqlnd php56-php-imap php56-php-mbstring

Instalación de PHP 5.6 + 7.4 + 8.1 en Oracle Linux 8

dnf install -y oracle-epel-release-el8

dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm