Skip to content

Instantly share code, notes, and snippets.

View bindreams's full-sized avatar
🐈
Software Developer; Kitty Enveloper

Anna Zhukova bindreams

🐈
Software Developer; Kitty Enveloper
  • 23:54 (UTC +02:00)
View GitHub Profile
@zgoda
zgoda / svgsurf.py
Last active August 2, 2022 03:16
Load svg into Pygame image using pynanosvg (https://github.com/ethanhs/pynanosvg)
from svg import Parser, Rasterizer
import pygame
import sys
def load_svg(filename, mode='RGBA', scale=None, size=None, clip_from=None, fit_to=None):
"""Returns Pygame Image object from rasterized SVG
If scale (float) is provided and is not None, image will be scaled.
@hermanbanken
hermanbanken / Dockerfile
Last active May 22, 2025 06:20
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \