This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double width desktop | |
CO=$(xrandr | tail -n+2|head -n1| cut -d " " -f1); W=$(xrandr | grep \* | awk '{print $1}'|cut -d "x" -f1);H=$(xrandr | grep \* | awk '{print $1}'|cut -d 'x' -f2);W2=$(echo "$W*2"| tr -d $'\r' |bc -l);xrandr --fb ${W2}x${H} --output ${CO} --mode ${W}x${H} --panning ${W2}x${H} | |
reset: | |
xrandr --fb ${W}x${H} --output ${CO} --mode ${W}x${H} --panning ${W}x${H} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PHP Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STR | |
ING) in xxxxxxxx.php on line ZZZ | |
PHP Parse error: syntax error, unexpected ']', expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in xxxxxxxxxxx.php on line XXX | |
At least on this installation of Ubuntu 18.04 & PHP7.2 ... those errors appear to be appearing just after some heredocs, so maybe heredoc syntaxis changed. (verify) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on script by William Lam - http://engineering.ucsb.edu/~duonglt/vmware/ | |
# Bring CPUs online | |
for CPU in $(ls /sys/devices/system/cpu/ |grep -E '(cpu[0-9])') | |
do | |
CPU_DIR="/sys/devices/system/cpu/${CPU}" | |
echo "Found cpu: \"${CPU_DIR}\" ..." | |
CPU_STATE_FILE="${CPU_DIR}/online" | |
if [ -f "${CPU_STATE_FILE}" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -mtime -10 -print0 | du -hc --files0-from - | tail -n 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Los comandos: | |
head -n -1 test.txt | |
tail -n +2 test.txt | |
cut -c 20-40 test.txt | |
son cosillas que no usa uno seguido, pero que agradeces que existan. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: can only stop created or running containers. xxIDxx is in state configured: container state improper | |
R= podman ps -a --sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zdump -v America/Mexico_City | grep $(date +"%Y") | |
America/Mexico_City Sun Apr 4 07:59:59 2021 UT = Sun Apr 4 01:59:59 2021 CST isdst=0 gmtoff=-21600 | |
America/Mexico_City Sun Apr 4 08:00:00 2021 UT = Sun Apr 4 03:00:00 2021 CDT isdst=1 gmtoff=-18000 | |
America/Mexico_City Sun Oct 31 06:59:59 2021 UT = Sun Oct 31 01:59:59 2021 CDT isdst=1 gmtoff=-18000 | |
America/Mexico_City Sun Oct 31 07:00:00 2021 UT = Sun Oct 31 01:00:00 2021 CST isdst=0 gmtoff=-21600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Requirements: nothing | |
#This script renames haproxy individual site configuration files to disable them for h2gencfg to be aware of them | |
#Script assumes templates on: /etc/haproxy/templates | |
#config files on /etc/haproxy/conf.d/ | |
#├── 20-http-domain.tld.cfg | |
#├── 40-https-domain.tld.cfg | |
#└── 50-backends-domain.tld.cfg | |
TIMEDATE=$(date +"%Y%m%d-%H%M%S") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----Instalacion | |
yum install gcc pcre-devel tar make systemd-devel.x86_64 -y | |
#yum groupinstall -y development | |
wget 'https://www.haproxy.org/download/2.4/src/haproxy-2.4.4.tar.gz' | |
tar zxvf haproxy-2.4.4.tar.gz | |
cd haproxy-2* | |
#make TARGET=linux-glibc | |
make TARGET=linux-glibc USE_OPENSSL=1 USE_SYSTEMD=1 | |
make install | |
-----Configuracion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tuve problemas con un disco fisico que no lo detecta(ba) correctamente la máquina al iniciar pero que si lo conectaba como disco extra ya en el Sistema Operativo funcionaba bien. | |
tons, decidí usar VirtualBox para instalarle un nuevo SO. | |
el usuario actual requiere poder manejar devices: | |
$ sudo usermod -a -G disk $USER | |
$ VBoxManage internalcommands createrawvmdk -filename "/tmp/diskuser.vmdk" -rawdisk /dev/sdX | |
Una vez en VirtualBox, solo se coloca en la parte de storage la referencia a /tmp/diskuser.vmdk y listo, ya podemos usarlo | |
$ sudo usermod -a -G vboxusers $USER #no se si sea estrictamente necesario, pero también lo ejecuté. | |
* no usar FS extravagantes, EXT4 por mucho. |