Skip to content

Instantly share code, notes, and snippets.

[Unit]
Description=A Socket
[Socket]
ListenStream=127.0.0.1:9999
Accept=yes
[Install]
WantedBy=sockets.target
@zuigon
zuigon / enable_i2s.sh
Last active March 5, 2024 12:58
orange pi H3 i2s
$ sudo armbian-add-overlay ./i2s_overlay.dts
@zuigon
zuigon / scroll.lua
Created July 14, 2020 20:57
hammerspoon middle scroll
-- MacOS middle-click scroll
local deferred = false
overrideRightMouseDown = hs.eventtap.new({ hs.eventtap.event.types.middleMouseDown }, function(e)
deferred = true
return true
end)
overrideRightMouseUp = hs.eventtap.new({ hs.eventtap.event.types.middleMouseUp }, function(e)
{ config, lib, ... }:
let
overlayLua = (import ./overlay_lua.nix);
overlayRofi = (import ./overlay_rofi.nix);
sources = import /home/b/.nixp/nix/sources.nix;
pkgs = import sources.nixpkgs {
config.allowUnfree = true;
overlays = [ overlayLua overlayRofi ];
{ config, pkgs, ... }:
let
unstable = import <nixos-unstable> {};
in
{
imports =
[ # Include the results of the hardware scan.
/etc/nixos/hardware-configuration.nix
#./hardware-configuration.nix
];
{pkgs, ...}:
{
nixpkgs.overlays = [
(self: super: {
riot-web = super.riot-web.override {
conf = {
default_server_config = {
"m.homeserver" = {
"base_url" = "https://matrix.bkr.st";
"server_name" = "bkr.st";
UPDATE url_alias SET alias = replace(replace(replace(replace(replace(
lower(alias), 'đ','d'), 'č','c'), 'ć','c'), 'ž','z'), 'š','s')
@zuigon
zuigon / daemon.conf
Created October 27, 2019 14:05
pulseaudio
default-sample-format = float32le
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 125
resample-method = soxr-vhq
enable-lfe-remixing = no
high-priority = yes
0x87eeac04 KEY_ENTER
0x87eeac02 KEY_ESC
0x87eeac08 KEY_LEFT
0x87eeac07 KEY_RIGHT
0x87eeac0b KEY_UP
0x87eeac0d KEY_DOWN
@zuigon
zuigon / eventemitter.txt
Last active October 13, 2015 18:24
rocketchat errors
2015-10-12 20:52:59 880: (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
2015-10-12 20:53:00 042: Trace
at process.addListener (events.js:160:15)
at process.on.process.addListener (node.js:802:26)
at Object.InstanceStatus.registerInstance (packages/konecty:multiple-instances-status/konecty:multiple-instances-status.js:46:1)
at Object.InstanceStatus.ping (packages/konecty:multiple-instances-status/konecty:multiple-instances-status.js:90:1)
at packages/konecty:multiple-instances-status/konecty:multiple-instances-status.js:75:1
at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
at packages/meteor/timers.js:6:1
at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108:1)