Skip to content

Instantly share code, notes, and snippets.

View msoranno's full-sized avatar

Miguel Soranno msoranno

  • Madrid
View GitHub Profile
@msoranno
msoranno / gist:060d1590ed771f39ef8ac77e78970dda
Last active April 16, 2017 17:16
Raspberri pi 3 Static IP wlan0
#solo pondremos fija la ip de la wifi.
#Averiguamos el gateway
ip route | grep default | awk '{print $3}'
-> 192.168.1.1
#Chequeamos los DNS
root@raspberrypi:/etc/network# cat /etc/resolv.conf
# Generated by resolvconf
nameserver 80.58.61.250
@msoranno
msoranno / gist:e4b5ee063824eb6dece3d7cd416f9b3d
Created May 6, 2017 16:26
Change comments color on vim
:highlight Comment ctermfg=green
#change time
service ntpd stop
date +%T -s "23:00"
#back to time
service ntp stop
ntpd -gq (force)
service ntp start
#status
db2 CATALOG TCPIP NODE nodo01 REMOTE la_ip_remota SERVER el_puerto_remoto REMOTE_INSTANCE la_insta_remota SYSTEM la_ip_remota OSTYPE LINUX
db2 terminate
db2 CATALOG DATABASE IN220615 AS INMIG AT NODE nodo01
db2 CATALOG DATABASE RT220615 AS RTMIG AT NODE nodo01
db2 terminate
@msoranno
msoranno / getSftpfile.sh
Created October 4, 2017 14:06
Getting a file via sftp
#!/bin/bash
export SSHPASS=somepass
sshpass -e sftp -oBatchMode=no -b - someuser@some.server.com << !
cd /bksPruebas/SCRIPTS_SALUD/SCRIPTSALUD_V01R00F00_Alfa2/
get SCRIPTSALUD_V01R00F00_Alfa2.zip
bye
!
@msoranno
msoranno / gist:1db0ca740856e2794226a0a5df439de7
Created February 27, 2018 16:41
Interesante forma de probar un puerto sin necesidad de ninguna utilidad externa
cat < /dev/tcp/127.0.0.1/22
-------------------------------
PUESTA EN MARCHA
-------------------------------
- generamos la clave con ssh y metemos la publica en github
- clonamos y nos posicionamos
git clone git@github.com:msoranno/mykubeStuff.git
cd mykubeStuff/
- creamos el persistent volume y el claim para jenkins de 1gb
kubectl create -f pv.yaml
kubectl create -f pv-claim.yaml
du -h --max-depth=1 | sort -hr
$uri = 'https://uri.com/file.txt'
$user = 'user'
$pass = 'pass' | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object Management.Automation.PSCredential ($user, $pass)
Invoke-WebRequest -Uri $uri -Credential $cred
# test port when no telnet
#/dev/tcp/host/port
# If host is a valid hostname or Internet address, and port is an integer port number
# or service name, bash attempts to open a TCP connection to the corresponding socket.
#/dev/udp/host/port
# If host is a valid hostname or Internet address, and port is an integer port number
# or service name, bash attempts to open a UDP connection to the corresponding socket.
cat < /dev/tcp/127.0.0.1/22