View gist:a85ff5d7a3f5d0c6e073ee21cbf6ca47
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
$ ps -p $$ -o args,ppid | |
COMMAND PPID | |
bash 1234 | |
$ ps -p 1234 -o args | |
COMMAND | |
/usr/lib/gnome-terminal/gnome-terminal-server |
View holamundo.py
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
foo = "hola" | |
bar = ", mundo!" | |
print ('{0}{1}'.format(foo,bar)) |
View index.html
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
<!doctype html> | |
<html lang="es"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>A Basic HTML5 Template</title> | |
<meta name="description" content="Una plantilla básica de HTML5 para inciar un proyecto."> | |
<meta name="author" content="Fredy Rosero"> |
View used_ports.sh
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
sudo lsof -i -P -n | |
# -i If no address is specified, this option selects the listing of all Internet and x.25 (HP-UX) network files. | |
# -P inhibits the conversion of port numbers to port names for network files. | |
# -n inhibits the conversion of network numbers to host names for network files. | |
sudo netstat -tulpn | grep LISTEN | |
# -t --tcp | |
# -u --udp | |
# -l Show only listening sockets. (These are omitted by default.) | |
# -p Show the PID and name of the program to which each socket belongs. |
View createpost.sh
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 | |
# https://jekyllrb.com/docs/front-matter/ | |
Create() { | |
title="$@" | |
author='Fredy Rosero' | |
date=$(date +%F) | |
FILENAME="${date}-${title// /-}.md" | |
HEDAER="---\n" |
View anbox-ubuntu.20.04.txt
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
# Modules | |
mkdir /dev/binder | |
mount -t binder binder /dev/binder | |
ls -1 /dev/{ashmem,binder} | |
# Instalation | |
snap install --devmode --beta anbox | |
sudo snap set anbox debug.enable=true | |
# Start |
View CiscoKeyGen.py
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
#! /usr/bin/python | |
print "\n*********************************************************************" | |
print "Cisco IOU License Generator - Kal 2011, python port of 2006 C version" | |
import os | |
import socket | |
import hashlib | |
import struct | |
# get the host id and host name to calculate the hostkey | |
hostid=os.popen("hostid").read().strip() | |
hostname = socket.gethostname() |
View start_phpmyadmin.sh
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
docker run -dit --name phpmyadmin \ | |
-e PMA_HOST=host.docker.internal \ | |
--add-host=host.docker.internal:host-gateway \ | |
-p 8080:80 \ | |
phpmyadmin | |
docker exec -it phpmyadmin /bin/bash |
View conn.sh
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 | |
while [ true ] | |
do | |
sudo ip link set wlan0 down | |
sudo ip link set wlan0 up | |
sleep 20 | |
done |
View openssl_CA.config
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
HOME = . | |
#oid_file = $ENV::HOME/.oid | |
oid_section = new_oids | |
[ new_oids ] | |
tsa_policy1 = 1.2.3.4.1 | |
tsa_policy2 = 1.2.3.4.5.6 | |
tsa_policy3 = 1.2.3.4.5.7 | |
#################################################################### | |
[ ca ] |