Skip to content

Instantly share code, notes, and snippets.

@Hugome
Hugome / with-shutdown.yaml
Created April 4, 2021 05:26
Dapr Community Call - 06/04/2021 - Shutdown demo
apiVersion: batch/v1
kind: Job
metadata:
name: test-with-shutdown
spec:
ttlSecondsAfterFinished: 200
template:
metadata:
annotations:
dapr.io/enabled: "true"
@Hugome
Hugome / gist:83ca4faf517da2585dae095a75d9df04
Created August 31, 2020 00:03
Autoconfigure pulseaudio with jack server
Startup script :
pactl load-module module-jack-sink && pactl load-module module-jack-source && pactl set-default-sink jack_out && pacmd set-default-source jack_in && pacmd list-sink-inputs | grep index | sed 's/ *index: *//g' | xargs -I{} pacmd move-sink-input "{}" jack_out
Shutdown script :
pacmd suspend false
@Hugome
Hugome / websocket.js
Created October 25, 2019 04:53
Ugly WS fix
'use strict';
// Why this file ?
// Some weird things happend on socket close :
// The 'close' event is call twice in some case...
// To search
const EventEmitter = require('events');
const crypto = require('crypto');
const https = require('https');