Skip to content

Instantly share code, notes, and snippets.

View pimeys's full-sized avatar

Julius de Bruijn pimeys

View GitHub Profile
-- PostgreSQL Schema Example with Tables, Relationships, Enums, Views, Comments, and Test Data
-- Drop existing objects if they exist (optional, for clean setup)
DROP VIEW IF EXISTS order_details_view;
DROP TABLE IF EXISTS order_items;
DROP TABLE IF EXISTS orders;
DROP TABLE IF EXISTS products;
DROP TABLE IF EXISTS user_profiles;
DROP TABLE IF EXISTS users;
DROP TYPE IF EXISTS order_status_enum;

State of Async WASI in Rust

Let me share what I've learned about implementing async WASIp2 components in Rust. My goal is to get the entire Tokio ecosystem working together seamlessly. This isn't a complete test of the ecosystem - some things might be simpler than we expect. Check out dicej's wasi-socket-tests repository for examples.

The first obstacle: you'll need a nightly version of Rust. Without it, you'll need major ecosystem changes to avoid the wasip2 module in the Rust standard library and use wasi crates for the necessary functionality.

Let's walk through the steps to get Reqwest working with Tokio.

Socket2

Building AndroidAPS with GitHub Actions

Learn how to automate building AndroidAPS using GitHub actions. If you don't know what these are, please just continue using the standard build instructions.

WARNING: Do NOT make your GitHub repository public and do NOT share the build artifacts with anyone. AndroidAPS prohibits distributing APKs and you will face personal responsibility if somebody else uses the artifact and encounters issues.

Setting up the repository

Create a private repository in GitHub. Create a directory .github/workflows and add a file android-build.yml with the following content:

Pasta recipe

Wet ingredients

  • 2 large eggs
  • 3 large yolks
  • Enough water to get 185 grams total

Dry ingredients

@pimeys
pimeys / hue.yaml
Last active November 2, 2022 11:43
blueprint:
name: ZHA - Philips Hue Dimmer Switch
description: 'Control lights with a Philips Hue Dimmer Switch.
The top "on" button will turn the lights on to the last set brightness
(unless the force brightness is toggled on in the blueprint).
Oct 10 19:34:48 naunau kernel: amdgpu: Move buffer fallback to memcpy unavailable
Oct 10 19:34:48 naunau kernel: amdgpu 0000:0c:00.0: amdgpu: 00000000839d5649 pin failed
Oct 10 19:34:48 naunau kernel: amdgpu 0000:0c:00.0: amdgpu: (-19) kernel bo pin failed
Oct 10 19:34:48 naunau kernel: amdgpu 0000:0c:00.0: amdgpu: HDCP: Failed to initialize HDCP
Oct 10 19:34:48 naunau kernel: amdgpu: Move buffer fallback to memcpy unavailable
Oct 10 19:34:48 naunau kernel: amdgpu 0000:0c:00.0: amdgpu: 00000000839d5649 pin failed
Oct 10 19:34:48 naunau kernel: amdgpu 0000:0c:00.0: amdgpu: (-19) kernel bo pin failed
Oct 10 19:34:48 naunau kernel: amdgpu 0000:0c:00.0: amdgpu: DTM: Failed to initialize DTM
Oct 10 19:34:48 naunau kernel: amdgpu: Move buffer fallback to memcpy unavailable
Oct 10 19:34:48 naunau kernel: amdgpu 0000:0c:00.0: amdgpu: 00000000839d5649 pin failed
-- two schemas
create schema [janEatsHisHat];
create schema [juliusQuitsHisJob];
-- this one in the first schema, it's the "parent" table
create table [janEatsHisHat].[delicious] (id int primary key);
-- this one in the second, the "child" table
create table [juliusQuitsHisJob].[arbeitsamt] (
id int primary key,
-- two schemas
create schema "janEatsHisHat";
create schema "juliusQuitsHisJob";
-- this one in the first schema, it's the "parent" table
create table "janEatsHisHat"."delicious" (id int primary key);
-- this one in the second, the "child" table
create table "juliusQuitsHisJob"."arbeitsamt" (
id int primary key,
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/n3ljilpgk55p7lxmcjv9hd8y4ia5zxk7-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
patching script interpreter paths in po/check-translations.sh tests/unittest_inspector.py
po/check-translations.sh: interpreter directive changed from "#!/bin/bash" to "/nix/store/iqprjr5k5385bhf1dzj07zwd5p43py1n-bash-5.1-p12/bin/bash"
tests/unittest_inspector.py: interpreter directive changed from "#! /usr/bin/env python3" to "/nix/store/rppr9s436950i1dlzknbmz40m2xqqnxc-python3-3.9.9/bin/python3"
@nix { "action": "setPhase", "phase": "configurePhase" }
#!/usr/bin/env python
import i3ipc
ipc = i3ipc.Connection()
prev_focused = None
for window in ipc.get_tree():
if window.focused:
prev_focused = window