Skip to content

Instantly share code, notes, and snippets.

View joselitosn's full-sized avatar

Vinicios R. Portella joselitosn

View GitHub Profile
@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 / minecraft-mods.md
Last active May 20, 2019 09:23
Compilation of my most used Minecraft mods
@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

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 / 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('''
#include <stdio.h>
#include <windows.h>
int main(int argc, char *argv[]) {
Beep(392, 350); Sleep(100);
Beep(392, 350); Sleep(100);
Beep(392, 350); Sleep(100);
Beep(311.1, 250); Sleep(100);
Beep(466.2, 25); Sleep(100);
Beep(392, 350); Sleep(100);
@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)