Skip to content

Instantly share code, notes, and snippets.

import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
@stofte
stofte / Cargo.toml
Last active September 26, 2023 14:20
rustc 1.72.0
[package]
name = "rust-cert"
version = "0.1.0"
edition = "2021"
[dependencies]
windows-sys = { version = "0.48", features = [
"Win32_Foundation",
"Win32_Security_Cryptography"] }
@stofte
stofte / store.cpp
Created September 22, 2023 11:24
Win32 certificate API
// From https://learn.microsoft.com/en-us/windows/win32/seccrypto/example-c-program-certificate-store-operations
// Modified to include example of how to find cert using thumbprint
// cl -D UNICODE store.cpp CRYPT32.LIB
#define UNICODE
#pragma comment(lib, "CRYPT32.LIB")
#include <stdio.h>
#include <windows.h>
#include <Wincrypt.h>

How to build todo application in rust_qt_bindings_generator on Windows 10 x64

Versions tested

  • Windows 10 (17134.345)
  • Qt 5.11.2
  • cmake 3.12.2
  • rust 1.30.0
  • VS 2017 x64 native devtools (eg Windows SDK and MSVC)
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging">
<listeners>
<add name="messages"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData="c:\logs\messages.svclog" />
</listeners>
</source>
</sources>
<Project ToolsVersion="4.0" DefaultTargets="Demo" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="TransformXml"
AssemblyFile="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.Tasks.dll"/>
<Target Name="Demo">
<TransformXml Source="..\Udbudsportalen\Website\Web.Template.config"
Transform="..\Udbudsportalen\Website\Web.Template.Test.config"
Destination="web.config"/>
</Target>
</Project>
@stofte
stofte / gist:3bfecf22e99b514327e46313e7b47810
Created June 28, 2018 11:08
Powershell to print status of all listed branches, inclusing how far different branches are from master
@(
"https://tfs.kraftvaerk.com/tfs/KvCollection/CLEVER/_git/CLEVER.BillingEngine",
"https://tfs.kraftvaerk.com/tfs/KvCollection/CLEVER/_git/CLEVER.Connect",
"https://tfs.kraftvaerk.com/tfs/KvCollection/CLEVER/_git/CLEVER.CPMS",
"https://tfs.kraftvaerk.com/tfs/KvCollection/CLEVER/_git/NOC.Services",
"https://tfs.kraftvaerk.com/tfs/KvCollection/CLEVER/_git/NOC.Tools",
"https://tfs.kraftvaerk.com/tfs/KvCollection/CLEVER/_git/POI.Services",
"https://tfs.kraftvaerk.com/tfs/KvCollection/CLEVER/_git/CLEVER.APP",
"https://tfs.kraftvaerk.com/tfs/KvCollection/CLEVER/_git/CLEVER.AzureFunctions",
"https://tfs.kraftvaerk.com/tfs/KvCollection/CLEVER/_git/CLEVER.RELEASE",
> Microsoft.ServiceBus.dll!Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageReceiver.EndReceiveCommand(System.IAsyncResult result, out System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.BrokeredMessage> messages) Unknown
Microsoft.ServiceBus.dll!Microsoft.ServiceBus.Messaging.IteratorAsyncResult<Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageReceiver.ReceiveAsyncResult>.StepCallback(System.IAsyncResult result) Unknown
Microsoft.ServiceBus.dll!Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(System.IAsyncResult result) Unknown
Microsoft.ServiceBus.dll!Microsoft.ServiceBus.Common.AsyncResult.TryComplete(bool didCompleteSynchronously, System.Exception exception) Unknown
Microsoft.ServiceBus.dll!Microsoft.ServiceBus.Common.AsyncResult.Complete(bool didCompleteSynchronously, System.Exception e) Unknown
Microsoft.ServiceBus.dll!Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory<System.ServiceModel.Channels.IRequestSessionChannel>.
<!--
1. Define a new CopyAllFilesToSingleFolderForPackageDependsOn prop group
2. Define SwaggerXmlDocumentationCopyFiles target to be run before CopyAllFiles target
3. Create target with itemgroup denoting all xml files to include in publish package
4. Modify the FilesForPackagingFromProject itemgroup by including all missing xml files
-->
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
SwaggerXmlDocumentationCopyFiles;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
@stofte
stofte / gist:03d6799ba665069aee343d594693aea4
Created October 23, 2017 12:59
Dump deadletter queues in Azure Service Bus
using Microsoft.ServiceBus;
using Microsoft.ServiceBus.Messaging;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DumpQueues