Skip to content

Instantly share code, notes, and snippets.

View msoranno's full-sized avatar

Miguel Soranno msoranno

  • Madrid
View GitHub Profile
import hudson.model.*
def q = Jenkins.instance.queue
q.items.each { q.cancel(it.task) }
@msoranno
msoranno / chkconfig_systemctl
Last active May 11, 2018 19:38
chkconfig systemctl
** verificar que el servicio está activo **
- antiguos sistemas
chkconfig --list
chkconfig <servicename> on
chkconfig <servicename> off
service <servicename> stop/start/status
- sistemas modernos
systemctl list-units
systemctl enable/disable <servicename>.service
systemctl start/stop/status <servicename>.service
@msoranno
msoranno / iptables
Last active May 11, 2018 19:37
iptables
-- see current configuration of the service
sudo systemctl cat iptables.service
-- save current configuration
sudo iptables-save > iptablesRules_04052018
-- see logs of changes
sudo journalctl -f -u iptables.service
-- restore rules
# Envío de notificaciones push
Nos encontramos con que el curl que teníamos solo soporta http1. Se pueden instalar todas las librerias necesarias para el http2,
pero otra opción es hacer lo siguiente:
- usar una imagen docker exclusiva para ejecutar curl http2
- Pasar todos los comandos del curl que hagan falta, headers, parameters, certificados, etc.
docker run -t -v /source/path/file.pem:/tmp/file.pem \
--rm badouralix/curl-http2 \
-d '{"aps":{"alert":"Hey BTX test from push.apple.com","badge":42}}' \
- find and delete files olders than 1800 days
find . -maxdepth 1 -type d -ctime +1800 -exec rm -rf {} +
@msoranno
msoranno / netplan and systemd-networkd
Last active May 17, 2018 07:51
netplan and systemd-networkd
-- identificar dispositivos de red
sudo lshw -class network
-- fichero de coonfiguracion (ubuntu < 17)
/etc/network/interfaces
-- asignar ip temporal
sudo ifconfig ens33 192.168.1.49 netmask 255.255.255.0
-- modificando el gateway by default
@msoranno
msoranno / ubuntu virtualbox bionic
Last active May 21, 2018 05:31
install virtualbox
Install VirtualBox on ubuntu bionic
vi /etc/apt/sources.list
deb https://download.virtualbox.org/virtualbox/debian bionic contrib
or
deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
@msoranno
msoranno / virtualbox
Last active May 11, 2018 19:35
virtualbox
-- Conocer la ip de una vm
VBoxManage guestproperty get <UUID|Machine Name> "/VirtualBox/GuestInfo/Net/0/V4/IP"
@msoranno
msoranno / minikube
Last active August 26, 2018 18:43
minikube
instalacion de minikube ububuntu 18.04
https://kubernetes.io/docs/tasks/tools/install-kubectl/
- instalar docker
- instalar un hypervisor , en este caso el recomendado el vmware player por que virutalbox hoy por hoy no soporta nested virtualization, es decir un hipervidor dentro de otro hyervisor
- deshabilitaremos ipv6
. metemos estas 3 lineas
cat <<EOF >> /etc/sysctl.d/99-sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
@msoranno
msoranno / openshift
Last active May 11, 2018 19:33
openshift
# Eventos del proyecto en que estes ubicado
oc get events -w
# Ver pods de un namespace especifico
oc get pods -n default
# Ver en que proyecto estas
oc Project
# Cambiarse de proyecto