Skip to content

Instantly share code, notes, and snippets.

@arrieta
arrieta / lexer.cpp
Last active August 22, 2025 07:52
Simple C++ Lexer
// A simple Lexer meant to demonstrate a few theoretical concepts. It can
// support several parser concepts and is very fast (though speed is not its
// design goal).
//
// J. Arrieta, Nabla Zero Labs
//
// This code is released under the MIT License.
//
// Copyright 2018 Nabla Zero Labs
//
@jirihnidek
jirihnidek / CMakeLists.txt
Last active December 15, 2024 22:01
Example of IPv6 TCP client-server application(s) using blocking sockets
# Main CMakeFile.txt
# Minimal version of CMake
cmake_minimum_required (VERSION 2.6)
# Build type
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
@fffaraz
fffaraz / tcp_syn.py
Created July 30, 2014 22:07
TCP syn flood in python using raw sockets
'''
Syn flood program in python using raw sockets (Linux)
http://www.binarytides.com/python-syn-flood-program-raw-sockets-linux/
Silver Moon ([email protected])
'''
# some imports
import socket, sys
from struct import *