Skip to content

Instantly share code, notes, and snippets.

View marcpabst's full-sized avatar

Marc Pabst marcpabst

  • UCL
  • London, UK
  • 19:26 (UTC -12:00)
View GitHub Profile
@marcpabst
marcpabst / main.rs
Created August 19, 2024 21:03
main.rs
// Copyright 2024 the Vello Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT
use anyhow::Result;
use std::num::NonZeroUsize;
use std::sync::Arc;
use vello::kurbo::{Affine, Circle, Rect, Size};
use vello::peniko::{Color, ColorStop, Compose, Gradient, Mix};
use vello::util::{RenderContext, RenderSurface};
use vello::{AaConfig, DebugLayers, Renderer, RendererOptions, Scene};
@marcpabst
marcpabst / main.rs
Last active August 13, 2024 18:05
Vello Gabor patch example
// Copyright 2024 the Vello Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT
use anyhow::Result;
use std::num::NonZeroUsize;
use std::sync::Arc;
use vello::kurbo::{Affine, Circle, Rect};
use vello::peniko::{Color, Fill, Gradient, Mix};
use vello::util::{RenderContext, RenderSurface};
use vello::{AaConfig, DebugLayers, Renderer, RendererOptions, Scene
### A Pluto.jl notebook ###
# v0.19.40
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
@marcpabst
marcpabst / main.rs
Last active February 24, 2024 21:14
fn main() {
// setup serial port
let port_name = "/dev/cu.usbmodem21301";
let mut port = serialport::new(port_name, 115_200)
.timeout(std::time::Duration::from_millis(10))
.open()
.expect("Failed to open port");
loop {
// start timer
This file has been truncated, but you can view the full file.
/* automatically generated by rust-bindgen 0.63.0 */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
pi@raspberrypi:~/home-assistant $ sudo script/build_frontend
> home-assistant-polymer@1.0.0 clean /home/pi/home-assistant/homeassistant/components/frontend/www_static/home-assistant-polymer
> rm -rf build/* build-temp/*
> home-assistant-polymer@1.0.0 frontend_prod /home/pi/home-assistant/homeassistant/components/frontend/www_static/home-assistant-polymer
> npm run js_prod && npm run frontend_html
pi@raspberrypi:~/home-assistant $ sudo script/build_frontend
> home-assistant-polymer@1.0.0 clean /home/pi/home-assistant/homeassistant/components/frontend/www_static/home-assistant-polymer
> rm -rf build/* build-temp/*
> home-assistant-polymer@1.0.0 frontend_prod /home/pi/home-assistant/homeassistant/components/frontend/www_static/home-assistant-polymer
> npm run js_prod && npm run frontend_html