(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
# Unhash ~/.ssh/known_hosts | |
HashKnownHosts | |
if $(grep -q "HashKnownHosts" /etc/ssh/ssh_config 2>&1 > /dev/null ) ; then | |
##########################3333 | |
SD Card RPI microSDHC EVO PLUS 32GB Class 10 | |
gil@gil-NUC10i7FNH:/media/gil/9016-4EF8$ fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=random_read_write.fio --bs=4k --iodepth=64 --size=1G --readwrite=randrw --rwmixread=75 | |
test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=64 | |
fio-3.16 | |
Starting 1 process | |
test: Laying out IO file (1 file / 1024MiB) | |
Jobs: 1 (f=1): [m(1)][100.0%][r=4688KiB/s,w=1445KiB/s][r=1172,w=361 IOPS][eta 00m:00s] | |
test: (groupid=0, jobs=1): err= 0: pid=562556: Thu Jul 2 20:35:30 2020 |
#!/bin/bash | |
# Inspired from https://www.prado.lt/how-to-set-up-pptp-client-on-debian-9 | |
#apt-get install pptp-linux | |
if dpkg -l | grep pptp-linux ; then echo "No instalarem paquet" ; else apt-get install pptp-linux ; fi | |
echo "Ip del servidor de tunel?" | |
read server |
from pyPdf import PdfFileWriter, PdfFileReader | |
import StringIO | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.pagesizes import letter | |
packet = StringIO.StringIO() | |
# create a new PDF with Reportlab | |
can = canvas.Canvas(packet, pagesize=letter) | |
can.drawString(100,100, "Hello world") | |
can.save() |
from md5 import md5 | |
# header from 401 response on REGISTER | |
# Authorization: Digest username="883140776410950", realm="gw_youmagic", algorithm=MD5, uri="sip:GW_Youmagic", nonce="1476157437:0a1418a40f8ee1c9a55f1587ab931c14", response="3ff479ccc24874f66aae45dac889d099" | |
login = '883140776410950' | |
uri = 'sip:GW_Youmagic' | |
nonce = '1476157437:0a1418a40f8ee1c9a55f1587ab931c14' | |
realm = 'gw_youmagic' | |
password = '----------' |
#!/usr/bin/python3 | |
import csv,ipaddress | |
with open('IPv4Address.csv', newline='') as csvfile: | |
data = list(csv.reader(csvfile)) | |
print(data[1][0]) | |
print(type(data)) | |
print(str(ipaddress.IPv4Address(3232235521))) |
--- | |
- name: prova routers_commands | |
hosts: mikrotik | |
connection: network_cli | |
remote_user: guifibages | |
gather_facts: false | |
tasks: | |
- name: run command on remote devices | |
routeros_command: | |
commands: /system routerboard print |
### Protocl CDP i LLDP | |
tcpdump '(ether[12:2]=0x88cc or ether[20:2]=0x2000)' |
sudo apt install openjdk-8-jdk openjdk-11-jdk snap | |
wget https://www.ubnt.com/downloads/tools/beta/discovery-tool/ubnt-discovery.zip | |
mkdir -p /opt/ubnt-discovery | |
sudo unzip ubnt-discovery.zip -d /opt/ubnt-discovery/ | |
touch /usr/bin/ubnt-discovery | |
echo -e "#!/bin/bash \n /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar /opt/ubnt-discovery/ubnt-discovery-v2.5.1.jar " > /usr/bin/ubnt-discovery |