Skip to content

Instantly share code, notes, and snippets.

View sassman's full-sized avatar
🦀
rust ❤️

Sven Kanoldt sassman

🦀
rust ❤️
View GitHub Profile
@emilk
emilk / svg_lyon_usvg.rs
Last active February 9, 2022 08:44
A bad way to show an SVG in egui
//! A not so great way to show an SVG in egui.
//!
//! This keeps the SVG as vector graphics to make it scalable,
//! but it has a few problems:
//!
//! * There is no anti-aliasing (would require MSAA backend)
//! * No support for gradients and text in SVG
//! * Has some bugs in it
//! * It is slow
//! * It is a lot of code
@tylerchr
tylerchr / Dockerfile
Created July 21, 2018 01:37
Compiling V8 for alpine (link against musl)
#
# Building V8 for alpine is a real pain. We have to compile from source, because it has to be
# linked against musl, and we also have to recompile some of the build tools as the official
# build workflow tends to assume glibc by including vendored tools that link against it.
#
# The general strategy is this:
#
# 1. Build GN for alpine (this is a build dependency)
# 2. Use depot_tools to fetch the V8 source and dependencies (needs glibc)
# 3. Build V8 for alpine
#include <Servo.h>
Servo myservo;
const int servoPin = 9;
const int buttonPin = 12;
const int ledPin = 13;
void setup() {
myservo.attach(servoPin);
@enaeseth
enaeseth / yaml_ordered_dict.py
Created February 25, 2011 19:54
Load YAML mappings as ordered dictionaries
import yaml
import yaml.constructor
try:
# included in standard lib from Python 2.7
from collections import OrderedDict
except ImportError:
# try importing the backported drop-in replacement
# it's available on PyPI
from ordereddict import OrderedDict