Skip to content

Instantly share code, notes, and snippets.

View angelroybernal's full-sized avatar

Angel Bernal angelroybernal

View GitHub Profile
@angelroybernal
angelroybernal / init.lua
Created August 11, 2024 22:33
Basic Neovim config
vim.opt.number = true -- show line number
vim.opt.cursorline = true -- highlight the line wherer the cursor is located
vim.opt.showmatch = true -- show the matching brackets, curly braces or parenteses
vim.opt.autoindent = true -- auto text indenting
vim.opt.smartindent = true -- smart indenting
vim.opt.smarttab = true -- smart tabbing
vim.bo.shiftwidth = 4 -- number of spaces to indent the code
vim.bo.softtabstop = 4 -- same as above
vim.bo.tabstop = 4 -- same thing again
@angelroybernal
angelroybernal / install_tools.sh
Last active June 12, 2024 06:51
Install WiFi Hacking tools on OpenWRT
opkg install horst aircrack-ng macchanger python3-light nmap tcpdump reaver
@angelroybernal
angelroybernal / SimpleHTTPServerWithUpload.py
Last active May 23, 2021 00:37 — forked from touilleMan/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload - Python3 version
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""
@angelroybernal
angelroybernal / run_sp.groovy
Last active December 2, 2020 20:48
Connect to Sybase and run Stored Procedure using Groovy
import groovy.sql.Sql
this.class.classLoader.rootLoader.addURL( new URL("file:/C:\\jtds-1.3.1.jar"))
def url = 'jdbc:jtds:sybase://host:port'
def user = 'usuario'
def passwd = 'verysafepassword'
def driver = 'net.sourceforge.jtds.jdbc.Driver'
def sql = Sql.newInstance(url, user, passwd, driver)
@angelroybernal
angelroybernal / install_python.sh
Created August 23, 2020 19:24
Install specific Python Version on Ubuntu 18.04
apt update
apt upgrade -y
apt install build-essential zlib1g-dev libncurses5-dev \
libgdbm-dev libnss3-dev libssl-dev libreadline-dev \
libffi-dev wget -y
cd /tmp
wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz #Replace with 3.8.1 with required version
tar -xvzf Python-3.8.1.tgz
cd Python-3.8.1
./configure
version: "3"
services:
jenkins_master:
image: "jenkinsci/blueocean"
volumes:
- ./jenkins_home:/var/jenkins_home
ports:
- "8080:8080"
- "50000:50000"
restart: always
@angelroybernal
angelroybernal / copy_pi_groups.sh
Created August 20, 2020 20:41
Bash Script to copy Raspberry Pi default user groups to custom user
#!/bin/bash
new_user=$1
echo "Adding groups to ${new_user}"
for group_name in `grep -E "(:|,)pi(:,|$)" /etc/group|cut -f1 -d:` ; do
sudo usermod -aG $group_name $new_user
echo "Added to group ${group_name}"
done
@angelroybernal
angelroybernal / install.sh
Last active August 2, 2020 07:50
Install driver for TP-Link AC600 on Ubuntu/Debian
# Update repos & upgrade packages
sudo apt update && sudo apt upgrade -y
# Installation requirements
sudo apt install git dkms
# Clone driver repository from Github
git clone https://github.com/aircrack-ng/rtl8812au.git
# Install using dkms
cd rtl8812au/
sudo ./dkms-install.sh
@angelroybernal
angelroybernal / flask-hello-world.py
Last active April 19, 2020 02:40
Hello World Web App using Python Flask
import os
from flask import Flask
app = Flask(__name__)
_port = os.environ.get('PORT', 5000)
@app.route('/')
def hello():
return "Hello World!"
@angelroybernal
angelroybernal / NmapScan.js
Created March 22, 2020 00:28
Full Nmap Scan using node-nmap
const nmap = require('node-nmap');
// Replace with nmap targets
var target = '192.168.1.0/24';
function myScan(hosts){
nmap.nmapLocation = 'nmap';
var nmapscan = new nmap.NmapScan(hosts);
nmapscan.on('complete', function(data){