Skip to content

Instantly share code, notes, and snippets.

View aneury1's full-sized avatar
🎯
Focusing

Aneury Perez aneury1

🎯
Focusing
  • BairesDev
  • Dominican Republic
View GitHub Profile
@Voltra
Voltra / Session.hpp
Created August 17, 2018 15:41
A session middleware for the C++ web framework Crow
#pragma once
#include <functional>
#include <unordered_map>
#include <string>
#include <mutex>
#include <sstream>
#include <locale>
#include <cstdlib>
#include <algorithm>
@Freddyerf
Freddyerf / validar_cedula.py
Last active September 13, 2022 14:55
Validación de cédula dominicana en Python
"""
Validación de cédula dominicana en Python por: Freddy Rondon
"""
def validar_cedula(cedula):
# La cédula debe tener 11 dígitos
cedula = cedula.replace('-','')
if len(cedula)== 11:
if (int(cedula[0:3]) < 122 and int(cedula[0:3]) > 0 or int(cedula[0:3]) == 402):
suma = 0
@define-private-public
define-private-public / HttpServer.cs
Last active April 9, 2024 08:38
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
@ryanb
ryanb / application.html.erb
Created January 19, 2011 19:31
Example of very simple password authentication.
<!-- layout file -->
<% if current_user %>
Welcome <%= current_user.username %>. Not you? <%= link_to "Log out", logout_path %>
<% else %>
<%= link_to "Sign up", signup_path %> or <%= link_to "log in", login_path %>.
<% end %>