Skip to content

Instantly share code, notes, and snippets.

I write code and sometimes it even works

LukasDoesDev LukasDoesDev

I write code and sometimes it even works
View GitHub Profile
LukasDoesDev /
Created Aug 10, 2021
Python range but multiple points
def range_complex(*points):
my_list = []
prev_point = None
for point in points:
if prev_point:
if prev_point < point:
my_list.extend(list(range(prev_point, point + 1)))
my_list.extend(list(range(point, prev_point))[::-1])
prev_point = point
View suckless

My suckless config





Jetbrains Mono:style=Regular:size=10

Noto Color Emoji:pixelsize=12:antialias=true:autohint=true

LukasDoesDev / app.js
Created Oct 23, 2020
web-hmm template code
View app.js
const app = require('web-hmm').createApp();
// Add this middleware before routing methods or the static file serve method
app.middleware.use((req, res) => {
// todo
console.log(` || Request Type: ${req.method}`);
console.log(` || Request URL: ${req.url}`);
console.log(` || Date & Time: ${new Date(}`);
next(); // Pass on for next middleware to use