Skip to content

Instantly share code, notes, and snippets.

View gunta's full-sized avatar
🎯
Focusing on UX for AI

Gunther Brunner gunta

🎯
Focusing on UX for AI
  • CyberAgent Co., Ltd
  • Tokyo, Japan
View GitHub Profile
@chanmathew
chanmathew / streaming.ts
Last active April 21, 2024 04:40
ElevenLabs streaming implementation - Typescript
const voiceId = '' // Pick any voice ID from https://docs.elevenlabs.io/api-reference/voices
const model = 'eleven_monolingual_v1'
const elUrl = `https://api.elevenlabs.io/v1/text-to-speech/${voiceId}/stream?optimize_streaming_latency=3` // Optimize for latency
const codec = 'audio/mpeg'
const maxBufferDuration = 60 // Maximum buffer duration in seconds
const maxConcurrentRequests = 3 // Maximum concurrent requests allowed
// Create a new MediaSource and Audio element
const mediaSource = new MediaSource()
const audioElement = new Audio()
@rain-1
rain-1 / LLM.md
Last active May 5, 2024 07:13
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@jcwillox
jcwillox / pnpm.ps1
Last active November 18, 2023 01:38
PowerShell Completion Script for `pnpm`
# powershell completion for pnpm -*- shell-script -*-
Register-ArgumentCompleter -CommandName 'pnpm' -ScriptBlock {
param(
$WordToComplete,
$CommandAst,
$CursorPosition
)
function __pnpm_debug {
@gullyn
gullyn / flappy.html
Last active May 4, 2024 15:35
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@nandorojo
nandorojo / knew.md
Last active April 28, 2024 06:44
What I wish I knew when I started with Expo Web, React Navigation & Next.js

I started using React Native in September 2018. I always forget some things when I build new apps, so I'll keep track of the gotchas on this post.

Some topics, such as navigation, will be fundamental to how I think about apps. Others, will be one-line helpers that make apps work more smoothly.

It's gotten to the point where I find my own answers from 6 months before on certain Github issues.

I'll keep adding over time as I think of more. If anyone thinks these topics would be useful, let me know and I'll elaborate.

I have made libraries to address a number of the topics here, from navigation to design.

@eanakashima
eanakashima / refs.md
Last active December 9, 2020 18:45
List of references from "Observability is for User Happiness," performance.now() 2019 (Amsterdam), and "Observability for Web Performance," #perfmatters 2020
@stared
stared / aspie_traits.md
Last active January 29, 2022 08:16
Interpersonal Traits of Aspies Placed in Context

Interpersonal Traits of Aspies Placed in Context

a chapter from A Mind-Body Look at the Concept of Asperger's Syndrome (pdf) by Michael Samsel, LMHC

A Hacker News discussion (2021) on this list

Uncommunicative Eye Contact

In humans, eye contact is the center of the attachment system. In Asperger's Syndrome there is either an avoidance of eye contact (most common) or an unvarying, relative unblinking, staring, constant eye contact (less common). Avoidant eye contact gives an impression of 'having something to hide', and also eliminates a big channel of communication and trust. Staring eye contact, because of its unchanging nature, is also uncommunicative, and is generally experienced as disturbing on the receiving end.

On Twitter the other day, I was lamenting the state of OCSP stapling support on Linux servers, and got asked by several people to write-up what I think the requirements are for OCSP stapling support.

  1. Support for keeping a long-lived (disk) cache of OCSP responses.

    This should be fairly simple. Any restarting of the service shouldn't blow away previous responses that were obtained. This doesn't need to be disk, just stable - and disk is an easy stable storage for most server

@voluntas
voluntas / webrtc.rst
Last active January 23, 2024 06:57
WebRTC の未来