Skip to content

Instantly share code, notes, and snippets.

View corlaez's full-sized avatar
🏠
WFH since January 2020

Armando Cordova corlaez

🏠
WFH since January 2020
View GitHub Profile
@corlaez
corlaez / README.md
Last active December 24, 2023 00:30
Tiny Kotlin Static Server

This is a tiny kotlin server, useful for simple dev scenarios. Features and limitations:

  • Validation of arguments, no hiding of errors
  • No caching, will read file each time is served (ideal for development server)
  • No dependency or dep management (gradle, maven). Just a single kotlin file and bat scripts
  • Prints all routes that it configures
  • Explicit, it requires you to declare a list of the filesnames to serve
  • No nesting. It will only serve files in the same directory

startServerAfterCompile.bat takes longer to initialize because it first compiles serve.kt to serveKt.class. However, this is only necessary if you are making changes to serve.kt. Use startServer.bat to run the server without compiling (starts faster)

@corlaez
corlaez / LICENSE
Last active February 20, 2024 18:04
html dsl htmx extensions
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@corlaez
corlaez / Cliente.java
Last active September 27, 2024 06:40
Codigo para persistir objetos en Java
package clases;
import java.io.Serializable;
public class Cliente implements Serializable {
private static final long serialVersionUID = 1_000_000_000_000_001L;
private Integer codigo;
private String nombre;
private String apellido;