Skip to content

Instantly share code, notes, and snippets.

View diego-go's full-sized avatar

Diego diego-go

View GitHub Profile
$ORIGIN diegogo.net.
$TTL 300
diegogo.net. IN SOA mercurio.diegogo.net. postmaster.diegogo.net. (
2020050916 ; serial
1200 ;
600 ;
2419199 ;
86400
) ;
@diego-go
diego-go / gist:d58359925803b1c839bc537aeb326aa8
Created June 22, 2020 23:35
Apache Reverse Proxy for Nextcloud Regular
# Virtual Host for Nextcloud regularly installed with Apache
<VirtualHost *:80>
ServerName cloud.techguides.yt
DocumentRoot /var/www/html/nextcloud
<Directory /var/www/html/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
@diego-go
diego-go / gist:010e83b5e4c49ad14913313ed3dc756d
Created June 22, 2020 23:34
Apache Reverse Proxy for Nextcloud Snap
# Virtual Host for Nextcloud, running with snap!
<VirtualHost *:80>
ServerName cloud.techguides.yt
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:81/
ProxyPassReverse / http://localhost:81/
</VirtualHost>
# Virtual Host for some application, running on port 8080
@diego-go
diego-go / myscripts.md
Last active January 27, 2020 17:44
Util scripts

Crear multiples archivos

for n in {1..1000}; do dd if=/dev/urandom of=file$( printf %03d "$n" ).bin bs=1 count=$(( RANDOM + 1024 )) done

Aplicar propiedades de usuario

for n in {1..40}; do chown diego:diego doc$( printf %1d "$n" ).pdf; done

@diego-go
diego-go / practica.md
Last active November 7, 2018 14:42
Practicas vrml

Code 1

#VRML V2.0 utf8
Group {
	children [
		Shape {
			appearance Appearance {
				material DEF mat Material {diffuseColor 1 0 0 }
			}
			geometry Sphere {}
@diego-go
diego-go / update.sh
Last active October 31, 2018 00:22
Update script
#!/bin/bash
echo -e "Actualizando paquetes..."
echo ""
apt-get --just-print upgrade 2>&1 | perl -ne 'if (/Inst\s([\w,\-,\d,\.,~,:,\+]+)\s\[([\w,\-,\d,\.,~,:,\+]+)\]\s\(([\w,\-,\d,\.,~,:,\+]+)\)? /i) {print "-PROGRAMA: $1 \t -INSTALADO: $2 \t -DISPONIBLE: $3\n"}'
apt-get --just-print upgrade 2>&1 | perl -ne 'if (/Inst\s([\w,\-,\d,\.,~,:,\+]+)\s\[([\w,\-,\d,\.,~,:,\+]+)\]\s\(([\w,\-,\d,\.,~,:,\+]+)\)? /i) {print "PROGRAM: $1 INSTALLED: $2 AVAILABLE: $3\n"}' > /tmp/paquetes
echo -e ""
echo Hay $(cat /tmp/paquetes | wc -l) paquetes que se pueden actualizar
@diego-go
diego-go / workshop
Last active December 20, 2017 06:01
Workshop Kubernetes
library genesis
the kubernetes book
Kubernetes master
-API server
-Scheduler
-Controller
-etcd
kubectl config get-contexts
### Keybase proof
I hereby claim:
* I am diego-go on github.
* I am dieggo (https://keybase.io/dieggo) on keybase.
* I have a public key whose fingerprint is 98E9 CD83 4C65 19F0 F6C8 9D29 76E9 365C F3DD A383
To claim this, I am signing this object: