This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using CoreFoundation; | |
using CoreGraphics; | |
using Foundation; | |
using ObjCRuntime; | |
namespace HIServices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.Log | |
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.LaunchedEffect | |
import androidx.compose.runtime.getValue | |
import androidx.compose.runtime.mutableStateOf | |
import androidx.compose.runtime.remember | |
import androidx.compose.runtime.setValue | |
import kotlinx.coroutines.CancellationException | |
import kotlinx.coroutines.channels.Channel | |
import kotlinx.coroutines.currentCoroutineContext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | |
export OPENAI_API_KEY='sk-your-openai-key' | |
journalctl --since "24 hours ago" --no-pager -k | npx typechat-cli@latest -s "$SCRIPT_DIR/dmesg-scan.ts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import vestaboard | |
import json | |
import threading | |
from dotenv import load_dotenv | |
from flask import Flask, request | |
load_dotenv() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace HomeDotAnaisDotDev; | |
using System; | |
using System.Linq; | |
using System.Reactive.Disposables; | |
using System.Reactive.Linq; | |
using HomeAssistantGenerated; | |
using NetDaemon.Common; | |
using NetDaemon.HassModel.Common; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EnumDisplaySettings | |
ChangeDisplaySettingsExW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export abstract class Result<T> { | |
abstract isOk(): boolean; | |
abstract isErr(): boolean; | |
abstract ok(): T | undefined; | |
abstract err(): Error | undefined; | |
static Ok<T>(val: T): Result<T> { | |
return new OkValue(val); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task KillProcessNicely(uint pid, int delayInMs = 3*1000) | |
{ | |
// Ugh, this is gross - https://stackoverflow.com/questions/16653517/how-best-to-post-wm-quit-to-a-running-process | |
var tids = NativeMethods.GetAllTopLevelWindowsInZOrder() | |
.Select(hwnd => { | |
uint wndpid = 0; | |
var tid = NativeMethods.GetWindowThreadProcessId(hwnd, out wndpid); | |
if (wndpid != pid) { | |
return (uint)0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> JustTheGame.dll!JustTheGame.LicensePromptViewModel..ctor.AnonymousMethod__18_5(Akavache.LoginInfo _) Line 67 C# | |
System.Reactive.dll!System.Reactive.Linq.ObservableImpl.Do<Akavache.LoginInfo>.Actions._.OnNext(Akavache.LoginInfo value) Line 158 C# | |
System.Reactive.dll!System.Reactive.Linq.ObservableImpl.Select<System.__Canon, System.__Canon>.Selector._.OnNext(System.__Canon value) Line 48 C# | |
System.Reactive.dll!System.Reactive.SafeObserver<JustTheGame.GameStoreHeuristicInfo>.WrappingSafeObserver.OnNext(JustTheGame.GameStoreHeuristicInfo value) Line 31 C# | |
System.Reactive.dll!System.Reactive.Linq.ObservableImpl.Select<ReactiveUI.ReactiveCommand<System.Reactive.Unit, System.__Canon>.ExecutionInfo, System.__Canon>.Selector._.OnNext(ReactiveUI.ReactiveCommand<System.Reactive.Unit, System.__Canon>.ExecutionInfo value) Line 48 C# | |
System.Reactive.dll!System.Reactive.Sink<ReactiveUI.ReactiveCommand<System.Reactive.Unit, JustTheGame.GameStoreHeuristicInfo>.ExecutionInfo>.ForwardOnNext(ReactiveUI.ReactiveComman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as pulumi from '@pulumi/pulumi'; | |
import * as docker from '@pulumi/docker'; | |
import * as pg from '@pulumi/postgresql'; | |
const cfg = new pulumi.Config(); | |
const network = new docker.Network('net'); | |
const pgImg = new docker.RemoteImage('postgresql-image', { | |
name: 'postgres:11', | |
keepLocally: true |
NewerOlder