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
@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
#include <stdio.h>
#include <stdlib.h>
#define TRUE 1
#define FALSE 0
struct Date
{
unsigned int day;
unsigned int month;
#include <stdio.h>
#include <stdlib.h>
#define TRUE 1
#define FALSE 0
struct Date
{
unsigned int day;
unsigned int month;
#include <stdio.h>
#include <stdlib.h>
struct Date
{
unsigned int day;
unsigned int month;
unsigned int year;
unsigned int status;
};
@giljr
giljr / Linear_regression_01.csv
Last active September 4, 2020 23:56
Linear_regression_01.csv
Index (x) Dataset (y) Error Square Error (SE)
1 34 -5 25
2 35 -1 1
3 39 2 4
4 42 3 9
5 43 7 49
6 47 0 0
Average 40 88
/* LEDC (LED Controller) fade example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/ledc.h"