Skip to content

Instantly share code, notes, and snippets.

View joselitosn's full-sized avatar

Vinicios R. Portella joselitosn

View GitHub Profile

LXC-with-VXLAN-tunneling

Seting up

  • Creating 2 KVM virtual machines (host1 and host2, each one them has kernel: 3.19.0-64-generic) and attached them in the network 192.168.10.0/24

  • Install LXC on each virtual machine

  • Interface of host1: 192.168.10.156

  • Interface of host2: 192.168.10.222

@joselitosn
joselitosn / pysmb.py
Created March 16, 2016 13:45
Python SMB Example
from smb.SMBConnection import SMBConnection
userID = 'user'
password = 'password'
client_machine_name = 'localpcname'
server_name = 'servername'
server_ip = '0.0.0.0'
domain_name = 'domainname'
@joselitosn
joselitosn / dhcp-rogue.py
Created October 3, 2014 23:46
Detects rogue DHCP servers
#!/usr/bin/env python
from scapy.all import *
fam, hw = get_if_raw_hwaddr(conf.iface)
# Define a callback function for when DHCP packets are received
def dhcp_callback(pkt):
# Check if the DHCP packet is a DHCP offer
if DHCP in pkt and pkt[DHCP].options[0][1] == 2:
print 'DHCP offer received from %s (%s)' % (pkt[IP].src, pkt[Ether].src)
@joselitosn
joselitosn / bsploader
Created November 27, 2017 17:50
Library to retrieve information on GoldSource BSP file format files
#!/usr/bin/env python3
"""
BSPLoader
"""
__author__ = "Vinicios R Portella"
__version__ = "0.1.0"
__license__ = "BSD"
from enum import Enum, auto
@joselitosn
joselitosn / minecraft-mods.md
Last active May 20, 2019 09:23
Compilation of my most used Minecraft mods
@joselitosn
joselitosn / graph-opencc.lua
Last active January 19, 2018 03:17
Attempt to create a text graph using unicode braille - not finished
local class = require 'middleclass'
Node = class("Node")
function Node:initialize(data)
self.next = nil
self.data = nil
end

The Big Table of RedFlux Generation

This document is intended as a way to report the current RedFlux generation values from various mods and suggest alterations to keep integrations between then.

Right now there are a few energy sytems used by different Minecraft mods, but currently RedFlux is the most commonly used.

My main focus is liquid fuels, but solid fuels are accounted for comparison purposes.

Contributions are very much welcome.

@joselitosn
joselitosn / install_nginx.sh
Last active December 25, 2015 07:19
Installing nginx + PHP-FPM from source into a Ubuntu 12.04.3 Box - NOT FOR PRODUCTION - Intended to be a minimal version to run DokuWiki - WORK IN PROGRESS
apt-get install build-essential libpcre3-dev libssl-dev zlib1g-dev
cd /opt/
wget http://nginx.org/download/nginx-1.5.6.tar.gz
tar -zxvf nginx-1.5.6.tar.gz
cd /opt/nginx-1.5.6/
./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-http_ssl_module
make
make install
adduser --system --no-create-home --disabled-login --disabled-password --group nginx
@joselitosn
joselitosn / ubuntu-trusty-preseed.seed
Created September 22, 2015 19:40
Preseed for Trusty Thrall - 14.04 LTS
########################################################################
#### Custom Preseed Amlin Europe using Ubiquity
### By Kelly Crabbé for Amlin Europe
### Tested on Ubuntu Trusty Thral 14.04 LTS
####################################################################
# General
####################################################################
# Once installation is complete, automatically power off.
@joselitosn
joselitosn / ffi_ex.py
Last active August 29, 2015 14:25 — forked from pfmoore/ffi_ex.py
from cffi import FFI
ffi = FFI()
ffi.set_unicode(True)
ffi.cdef('''
HANDLE FindFirstVolume(LPTSTR lpszVolumeName, DWORD cchBufferLength);
BOOL FindVolumeClose(HANDLE hFindVolume);
''')
lib = ffi.verify('''