Skip to content

Instantly share code, notes, and snippets.

Avatar
🖥️
I write code and sometimes it even works

LukasDoesDev LukasDoesDev

🖥️
I write code and sometimes it even works
View GitHub Profile
@LukasDoesDev
LukasDoesDev / range_complex.py
Created Aug 10, 2021
Python range but multiple points
View range_complex.py
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)))
else:
my_list.extend(list(range(point, prev_point))[::-1])
prev_point = point
View suckless config.md

My suckless config

Color:

#9d5fae

Fonts:

mononoki:size=10

Jetbrains Mono:style=Regular:size=10

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

@LukasDoesDev
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(Date.now()).toString()}`);
next(); // Pass on for next middleware to use
}, 'LOGGING_MIDDLEWARE');