Skip to content

Instantly share code, notes, and snippets.

apiVersion: apps/v1
kind: Deployment
metadata:
name: echo-deployment
spec:
replicas: 3
selector:
matchLabels:
app: echo-pod
template:
@kungfoo
kungfoo / Porgam.cs
Created November 26, 2021 09:36
Simplified Falcon BMS Speech Recognition
using System;
using System.Speech.Recognition;
namespace SpeechRecognitionApp
{
class Program
{
static void Main(string[] args)
{
<?xml version="1.0" encoding="utf-8"?>
<JoyAssgn xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<axis>
<AxAssgn>
<AxisName>Roll</AxisName>
<AssgnDate>2021-02-15T23:48:57.1107391+01:00</AssgnDate>
<Invert>false</Invert>
<Saturation>None</Saturation>
<Deadzone>None</Deadzone>
</AxAssgn>
@kungfoo
kungfoo / reshade-preset.ini
Created January 8, 2021 22:12
Vibrance + SMAA + Bloom
[ArcaneBloom.fx]
uAdapt_DoLimits=1
uAdapt_Intensity=0.803003
uAdapt_Limits=0.600000,1.000000
uAdapt_Precision=0
uAdapt_Sensitivity=1.020001
uAdapt_Time=2.279999
uBloomIntensity=0.400000
uBloomSaturation=1.000000
uDirtIntensity=1.769999
@kungfoo
kungfoo / blub.java
Last active November 15, 2019 08:02
Taking up to n results with time based eviction
package io.beekeeper.sample;
import java.util.concurrent.TimeUnit;
import com.codahale.metrics.health.HealthCheck.Result;
import io.reactivex.Observable;
import io.reactivex.schedulers.Schedulers;
import io.reactivex.subjects.ReplaySubject;
import io.reactivex.subjects.Subject;
@kungfoo
kungfoo / destroy.sh
Last active November 12, 2019 13:03
Generic start and stop scripts for quick turnaround using gradle and docker-compose
#!/bin/bash
docker-compose down
================================== CRASHLOG =====================================
Falcon BMS.exe caused an EXCEPTION_ACCESS_VIOLATION in:
00000000400BB6B7 Falcon BMS.exe, F4SoundPos::PlayRel()+7 byte(s), e:\wip\bms\svn\source\rel-4.34\falcsnd\fsound.cpp, line 1789+7 byte(s)
Exception handler called in UnhandledExceptionHandler.
Read from location 0000000000000198 caused an access violation.
Bytes at CS:RIP: 48 83 B8 98 01 00 00 00 74 1D F2 0F 10 40 28 F2
Registers:
RAX=0x0000000000000000 RBX=0x0000000000000000 RCX=0x0000000071f929b8 RDX=0x0000000000000120
RSI=0x0000000071f927d0 RDI=0x0000000000000000 RBP=0x0000000000000000 RSP=0x000000001d64f928
@kungfoo
kungfoo / opus-encoder.c
Last active July 18, 2019 11:28
Rough API for writing pcm data to an opus file using opusenc
/* as an implementation note, we should stick to the same interface between
platforms. An interface we can 'share' should look something like this:
*/
#include "libopusenc/include/opusenc.h"
OggOpusEnc* get_encoder() {
// TODO: get encoder that was previously instantiated.
}
@kungfoo
kungfoo / for-comprehension-on-futures.scala
Created July 10, 2019 20:27
Really cool sala actor sample
class SecurityPricingActor(exchange: Exchange, backOffice: BackOffice) extends Actor {
def receive = {
case GetPricingInfo(security: Security) =>
val originalSender = sender
val bidAndAskFuture = Future { exchange.getBidAndAsk(security.id) }
val lastPriceFuture = Future { backOffice.getLastPrice(security.id) }
val response = for {
(bid, ask) = bidAndAskFuture
lastPrice = lastPriceFuture
@kungfoo
kungfoo / gist:a14075af1517389dd3272a57f2c22e43
Created June 27, 2019 08:22
Dsiplaylink daemon systemd service
[Unit]
Description=DisplayLink Manager Service
After=display-manager.service
Conflicts=getty@tty7.service
[Service]
ExecStartPre=/sbin/modprobe evdi
ExecStart=/usr/lib/displaylink/DisplayLinkManager
Restart=always
WorkingDirectory=/usr/lib/displaylink