Skip to content

Instantly share code, notes, and snippets.

[package]
name = "blast"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
vulkano = "0.32.3"
sdl2 = { version = "0.35.2", features = ["raw-window-handle"] }
@anlsh
anlsh / Cargo.toml
Created March 18, 2023 03:24
Vulkan: trying to get a triangle :)
[package]
name = "blast"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
vulkano = "0.32.3"
sdl2 = "0.35.2"
Mar 16 20:45:37 pop-os steam[14674]: g_main_context_push_thread_default: assertion 'acquired_context' failed
Mar 16 20:45:37 pop-os steam[14674]: g_main_context_pop_thread_default: assertion 'g_queue_peek_head (stack) == context' failed
Mar 16 20:45:37 pop-os org.kde.kdeconnect.daemon.desktop[4549]: "Object does not exist at path “/org/freedesktop/NetworkManager/ActiveConnection/1”"
Mar 16 20:45:47 pop-os steam[14674]: g_main_context_push_thread_default: assertion 'acquired_context' failed
Mar 16 20:45:47 pop-os steam[14674]: g_main_context_pop_thread_default: assertion 'g_queue_peek_head (stack) == context' failed
Mar 16 20:45:47 pop-os org.kde.kdeconnect.daemon.desktop[4549]: "Object does not exist at path “/org/freedesktop/NetworkManager/ActiveConnection/1”"
Mar 16 20:45:57 pop-os steam[14674]: g_main_context_push_thread_default: assertion 'acquired_context' failed
Mar 16 20:45:57 pop-os steam[14674]: g_main_context_pop_thread_default: assertion 'g_queue_peek_head (stack) == context' failed
Mar 16 20:45:57
#pragma once
#include <grpcpp/grpcpp.h>
#include "CallStruct.h"
#include "CompletionQueuePool.h"
using namespace grpc;
namespace grpcutils {
#
# OpenSSL example configuration file.
# This is mostly being used for generation of certificate requests.
#
# Note that you can include other files from the main configuration
# file using the .include directive.
#.include filename
# This definition stops the following lines choking if HOME isn't
from __future__ import print_function
import logging
import grpc
import Greet_pb2
import Greet_pb2_grpc
def run_serversecure():
@anlsh
anlsh / working-tls-server-hello.txt
Created March 4, 2021 06:10
Server TLS hello package (sent by .net core grpc in response to https://gist.github.com/anlsh/5fef006f526799095d3d52bf63861b0b)
Frame 17652: 1331 bytes on wire (10648 bits), 1331 bytes captured (10648 bits) on interface \Device\NPF_Loopback, id 0
Null/Loopback
Internet Protocol Version 6, Src: ::1, Dst: ::1
0110 .... = Version: 6
.... 0000 0010 .... .... .... .... .... = Traffic Class: 0x02 (DSCP: CS0, ECN: ECT(0))
.... 0000 00.. .... .... .... .... .... = Differentiated Services Codepoint: Default (0)
.... .... ..10 .... .... .... .... .... = Explicit Congestion Notification: ECN-Capable Transport codepoint '10' (2)
.... .... .... 1101 1000 1101 0001 0100 = Flow Label: 0xd8d14
Payload Length: 1287
Next Header: TCP (6)
@anlsh
anlsh / working-tls-client-hello.txt
Last active March 4, 2021 06:08
Working TLS client hello packet (sent by .NET core client)
Frame 17650: 229 bytes on wire (1832 bits), 229 bytes captured (1832 bits) on interface \Device\NPF_Loopback, id 0
Null/Loopback
Internet Protocol Version 6, Src: ::1, Dst: ::1
0110 .... = Version: 6
.... 0000 0010 .... .... .... .... .... = Traffic Class: 0x02 (DSCP: CS0, ECN: ECT(0))
.... 0000 00.. .... .... .... .... .... = Differentiated Services Codepoint: Default (0)
.... .... ..10 .... .... .... .... .... = Explicit Congestion Notification: ECN-Capable Transport codepoint '10' (2)
.... .... .... 0011 1001 1110 0001 1110 = Flow Label: 0x39e1e
Payload Length: 185
Next Header: TCP (6)
@anlsh
anlsh / failed-tls-client-hello.txt
Last active March 4, 2021 06:08
Failed TLS client hello packet (sent by Python GRPC client)
Frame 23442: 561 bytes on wire (4488 bits), 561 bytes captured (4488 bits) on interface \Device\NPF_Loopback, id 0
Null/Loopback
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x02 (DSCP: CS0, ECN: ECT(0))
0000 00.. = Differentiated Services Codepoint: Default (0)
.... ..10 = Explicit Congestion Notification: ECN-Capable Transport codepoint '10' (2)
Total Length: 557
Identification: 0xfe48 (65096)
// Startup.cs
public class Startup {
public void ConfigureServices(IServiceCollection services) {
services.AddGrpc();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseRouting();
app.UseEndpoints(endpoints =>