Skip to content

Instantly share code, notes, and snippets.

View giljr's full-sized avatar
💭
Full Stack Developer with a degree in Computer Engineering.

Gilberto Oliveira Jr giljr

💭
Full Stack Developer with a degree in Computer Engineering.
View GitHub Profile
Django Terminologies Description
Django Project Is a collection of apps and configs when combined together will make up the full web app (your complete website)
Django Application Is created to perform a particular functionality as a registration app a polling app comments app etc.
@giljr
giljr / django_project_folder.csv
Last active July 26, 2021 19:15
django_project_folder.csv
File Description
__init__.py This is a blank Python script that due to its special name it will be treated as a package
asgi.py At a very high-level ASGI is a communication interface between apps and servers
settings.py This is where you will store all your project settings
urls.py This is a Python script that will store all the URL patterns for your project. Meaning diff pages of your web app :)
wsgi.py This is a Python script that acts as the Web Server Gateway Interface. It ll help us to deploy our app to production
manage.py This is a Python script that is associated with many commands as we build our web app!
def prog_fibo_2(n):
a = 1
b = 1
for i in range(n):
yield a
a, b = b, a + b
# Program to display the Fibonacci sequence up to n-th term
nterms = int(input("How many terms? "))
# first two terms
n1, n2 = 0, 1
count = 0
# check if the number of terms is valid
if nterms <= 0:
@giljr
giljr / zabbix.csv
Last active January 21, 2021 17:29
zabbix.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 3 columns, instead of 2 in line 6.
N°, CMD, Description
1, apt-get update, used to download package info from all configured sources
2, sudo apt-get update, retrieves info about what packages can be updates to currently installed package
3, clear, cleaning the console
4, docker run - name mysql-server -t -e MYSQL_DATABASE='zabbix' -e MYSQL_USER='zabbix' -e MYSQL_PASSWORD='jaythree123' -e MYSQL_ROOT_PASSWORD='root1234' -d mysql - character-set-server=utf8 - collation-server=utf8_bin - default-authentication-plugin=mysql_native_password, Install docker
5, docker run - name zabbix-java-gateway -t - restart unless-stopped -d zabbix/zabbix-java-gateway, Install java gw
6, docker run - name zabbix-server-mysql -t -e DB_SERVER_HOST='mysql-server' -e MYSQL_DATABASE='zabbix' -e MYSQL_USER='zabbix' -e MYSQL_PASSWORD='kamisama123' -e MYSQL_ROOT_PASSWORD='YjA0OTYwZDBiN2EwNWFjMTRjZGU3Yjcy' -e ZBX_JAVAGATEWAY='abbix-java-gateway' - link mysql-server:mysql - link zabbix-java-gateway:zabbix-java-gateway -p 10051:10051 - restart unless-stopped -d zabbix/zabbix
@giljr
giljr / CCLAB_01_B.csv
Last active January 15, 2021 00:32
CCLAB_01_B,csv
Mode Command Description
Router(config)# username admin privilege 15 secret 123 We created a local user with total privilege (level 15)
Router(config)# ip domain-name labcisco.com.br Name of the domain that will be used to generate the SSH encryption keys
Router(config)# aaa new model The authentication authorization and accounting (AAA pronounced “triple A”) method is used
Router(config)# crypto key generate rsa Generate RSA key pairs. The name for the keys will be: labcisco.com.br
Router(config)# ip ssh version 2 SSH v2 is supported by Cisco IOS platforms Use it! :)
Router(config)# no ip ssh version 1 Do not use SSH 1 :/
Router(config)# ip ssh time-out 30 To prevent Telnet (or SSH) sessions from timing out before 30secs
Router(config)# ip ssh authentication retries 3 Specify the number of authentication-retries not to exceed 3 authentication-retries The defaults is 3
Router(config)# line vty 0 4 Open 5 virtual interfaces for remote access
@giljr
giljr / CCLAB_01.csv
Last active August 31, 2022 10:55
CCLAB_01.csv
Mode Command Description
Router> enable User EXEC Mode
Router# configure terminal Privileged EXEC mode
Router(config)# hostname 1841 The router's name
1841(config)# no ip domain lookup DNS lookup function is disabled on the router
1841(config)# banner motd @ Message Of The Day (MOTD) banner is presented
- - ########################################
- - Only Authorized Personnel!!!
- - ########################################
@ - End with the character '@'
Term Description
Cisco IOS Cisco Internetworking Operating System
CLI Command Line Interface
EXEC Command line session for the router - can be console modem or telnet
RAM Random Access Memory
NVRAM Non-Volatile RAM used to store the router's configuration
Flash Non-volatile memory used to store IOS software image
Line Properties broker1 Values (mosquitto.br_conf) broker0 Values (mosquitto.conf) Description
210 port 1884 1883 Port to use for the default listener
310 tls_version tlsv1.2 tlsv1.2 the version of the TLS protocol to use for this listener
374 listener - 8883 listener port-number [ip address/host name]
450 cafile - C:\...\mosquitto\certs\ca.crt defines the path to a file containing the CA certificates
454 certfile - C:\...\mosquitto\certs\server.crt Path to the PEM encoded server certificate
457 keyfile - C:\...\mosquitto\certs\server.key Path to the PEM encoded keyfile
651 allow_anonymous false false If `password_file` or `psk_file` is set
669 password_file C:\...\mosquitto\passwordfile.pwd C:\...\mosquitto\passwordfile.pwd If password_file is set the auth_plugin check will be made first
728 acl_file C:\...\mosquitto\acl.acl C:\...\mosquitto\acl.acl If acl_file is set the auth_plugin check will be made first
Term Description
Node Any device that is or can be part of an ESP-MESH network
Root Node The top node in the network
Child Node A node X is a child node when it is connected to another node Y where the connection makes node X more distant from the root node than node Y (in terms of number of connections)
Parent Node The converse notion of a child node
Descendant Node Any node reachable by repeated proceeding from parent to child
Sibling Nodes Nodes that share the same parent node
Connection A traditional Wi-Fi association between an AP and a station A node in ESP-MESH will use its station interface to associate with the softAP interface of another node thus forming a connection The connection process includes the authentication and association processes in Wi-Fi
Upstream Connection The connection from a node to its parent node
Downstream Connection The connection from a node to one of its child nodes