Skip to content

Instantly share code, notes, and snippets.

View RenatoExpert's full-sized avatar
🛰️
Per Aspera Ad Astra

Renato Araujo RenatoExpert

🛰️
Per Aspera Ad Astra
View GitHub Profile
@RenatoExpert
RenatoExpert / Dockerfile
Created December 4, 2023 21:39
Dockerfile to ScadaBR v1.2
FROM debian:latest
WORKDIR /scadabr
RUN apt update && apt upgrade
RUN yes | apt install wget unzip
RUN wget https://github.com/ScadaBR/ScadaBR/releases/download/v1.2/ScadaBR_Setup_Linux.zip
RUN unzip ScadaBR_Setup_Linux.zip
CMD ./install_scadabr.sh && echo "Press CTRL+P then CTRL+Q now" && read REPLY
@RenatoExpert
RenatoExpert / calc_sample.js
Created October 6, 2023 16:12
Applying integrations in nodejs
const assert = require('node:assert');
const test = require('node:test');
function f(t) {
assert.ok(t >= 0);
if(t < 1) {
return t;
} else {
return Math.pow(t, 2) - 1;
}
@RenatoExpert
RenatoExpert / modbus_scan.ps1
Created August 22, 2023 19:55
Look for modbus
Add-Type -AssemblyName System.Windows.Forms
# Create a form
$form = New-Object System.Windows.Forms.Form
$form.Text = "PowerShell Dialog"
$form.Size = New-Object System.Drawing.Size(300, 150)
$form.StartPosition = "CenterScreen"
# Create a label
$label = New-Object System.Windows.Forms.Label
; Written by Renato Araujo, 2023
; [email protected]
; @renatoexpert
; Assembly demo for 6502
; I am playing this at the following app
; https://play.google.com/store/apps/details?id=com.redlee90.learn6502assembly
; Addresses may vary from device to device,
; eg. atari, nes, motorola...
; Made by Renato Araujo, 2023
; [email protected]
; gh: renatoexpert
JSR init
JSR loop
init:
LDA #$11
STA $00

Configure a custom kernel to be compiled

How settings are storaged

The configuration is just a ´.config´ text file inside source directory. Each line mention an option like CONFIG_ARCH_USE_MEMTEST=y. Every driver can be marked to be compiled into the kernel monolith (DRIVER=y), or as module(DRIVER=m), or as not be compiled(DRIVER=n).

How to get or create a .config

  • You can copy from your distro's config. Its location varies, but is usually something like /boot/config-3.0.7 (need to rename) or /usr/src/linux/.config.
  • Another option is to generate a brand new using make alldefconfig (create a .config with default modules) or make tinyconfig (a very tiny kernel).
@RenatoExpert
RenatoExpert / install_zsh_with_kali_theme.sh
Last active January 4, 2023 06:50
Install Zsh with Kali theme!
#!/bin/sh
echo "Written by Renato R R Araujo <[email protected]>"
echo "License Warning
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
"
echo "Press any key if you read and agree with these terms, or press Ctrl+C anytime to cancel"
@RenatoExpert
RenatoExpert / git_console.sh
Created June 16, 2022 17:40
This is script is an terminal emulator for use git commands faster
#!/bin/bash
# This is script is an terminal emulator for use git commands faster.
# I like to use it in a tmux panel, when Im developing software. This way
# I can work a bit faster.
while true
do
read -p "$ git " COMMAND
# If no command is sent, it will consider as status (git status)
/*
Event: 'connect'#
Added in: v0.7.0
response <http.IncomingMessage>
socket <stream.Duplex>
head <Buffer>
Emitted each time a server responds to a request with a CONNECT method. If this event is not being listened for, clients receiving a CONNECT method will have their connections closed.
This event is guaranteed to be passed an instance of the <net.Socket> class, a subclass of <stream.Duplex>, unless the user specifies a socket type other than <net.Socket>.
@RenatoExpert
RenatoExpert / auto_pump.ino
Created March 30, 2022 20:12
Sensor level with Pump C++ code for Arduino - For Professor Rodrigo Icaro
/*
* Level Sensor C++ Code for Arduino
* Renato Araújo, 29 mar 2022
* [email protected]
* github: @renatoexpert
*/
/*
* NOTE
* Tinkercad eletronics are not working properly, since