Skip to content

Instantly share code, notes, and snippets.

View Heliodex's full-sized avatar
📉
Programstinating

Lewin Kelly Heliodex

📉
Programstinating
View GitHub Profile
@MasazI
MasazI / fit_and_paste.go
Created January 17, 2018 09:42
fit and paste golang using imaging
package main
import (
"image/color"
"log"
"github.com/disintegration/imaging"
)
func main() {

Libuv and libev, two I/O libraries with similar names, recently had the privilege to use both libraries to write something. Now let's talk about my own subjective expression of common and different points.

The topic of high-performance network programming has been discussed. Asynchronous, asynchronous, or asynchronous. Whether it is epoll or kqueue, it is always indispensable to the asynchronous topic.

Libuv is asynchronous, and libev is synchronous multiplexing IO multiplexing.

Libev is a simple encapsulation of system I/O reuse. Basically, it solves the problem of different APIs between epoll and kqueuq. Ensure that programs written using livev's API can run on most *nix platforms. However, the disadvantages of libev are also obvious. Because it basically just encapsulates the Event Library, it is inconvenient to use. For example, accept(3) requires manual setnonblocking after connection. EAGAIN, EWOULDBLOCK, and EINTER need to be detected when reading from a socket. This is a

@Life-In-Dev
Life-In-Dev / Data Store Guide.md
Last active March 11, 2026 11:32
A layman's guide to Data Stores in Roblox.

What are data stores?

Data stores are a service offered to developers which allow them to save data and fetch it from any server in the universe (game), and are essentially structured as associative arrays.

How are data stores structured?

Data stores are structured similarly to dictionaries/records. They consist of key-value pairs. Each key is unique and acts like a "header" or "identifier", if you like, and can hold a value that can be converted or serialised into JSON. This means that you cannot explicitly set a key's value to a userdata (which includes but is not limited to Instances), and can only save primitive types (numbers, booleans, strings and tables containing only these types).

Example

# coding: utf-8
from creative import *
def clear_screen():
for _ in range(50):
print("")
def get_percentage(stats,string):
@christoph-frick
christoph-frick / Awesome-Fennel.md
Last active August 27, 2025 00:26
Use fennel to write the awesome-wm config

How to write an awesome-wm config with Fennel

Awesome-WM is a X11 window manager, that is configured via Lua. Fennel is a Lisp for Lua. This shows a general setup of how to write your awesome-wm config using fennel directly without the compilation step (which would also work, but is not needed).

General setup

Fetch a recent Fennel version (the

Windows 7 Ultimate Retail Offline Activation Key
BR6G7-729GM-DQDQW-F9M4P-MM2JX
J6XG4-8JFTF-43CHH-8Q2VW-KHQH6
YQMCM-3W6TK-YXP66-GKCJV-PX7PH
[Tested working on 18 June 2013]
=================================================================================
Windows 7 Pro / Enterprise Online Activation MAK Key
@TrillCyborg
TrillCyborg / mastodon-docker-setup.md
Last active December 15, 2025 03:22
Mastodon Docker Setup

Mastodon Docker Setup

Setting up

Clone Mastodon's repository.

# Clone mastodon to ~/live directory
git clone https://github.com/tootsuite/mastodon.git live
# Change directory to ~/live

cd ~/live

@Kautenja
Kautenja / tar-progress.md
Last active December 29, 2025 14:51
one-liners for using tar with gzip and pv for a progress bar

Compress

tar cf - <files> -P | pv -s $(du -sb <files> | awk '{print $1}') | gzip > <some .tar.gz file>

where:

  • `` is the root-mounted (i.e. starts with /) path to the files
@bricss
bricss / druuid.mjs
Last active February 28, 2026 13:10
Date-relative (and relatively universally unique) UUID generation. Inspired by: https://www.npmjs.com/package/druuid
export let epoch = 0;
export const gen = (date = Date.now()) => {
return ((BigInt(date - epoch) << (64n - 41n)) ^ (BigInt(crypto.getRandomValues(new Uint8Array(32)).join('')) % (2n ** (64n - 41n))));
};
export const time = (uuid) => {
return new Date(Number((BigInt(uuid) >> (64n - 41n))) + epoch);
};
# coding: utf-8
from creative import *
def clear_screen():
for _ in range(50):
print("")
def get_percentage(stats,string):