Skip to content

Instantly share code, notes, and snippets.

@akissu
akissu / gist:63243a30d7bd5fd31f2ed6d4f6efad46
Created July 7, 2023 22:19
Pulse Audio Remote Server
# Open FW rules for the following
# ss -tulpn | grep pulse
tcp LISTEN 0 5 0.0.0.0:4713 0.0.0.0:* users:(("pulseaudio",pid=2962036,fd=37))
tcp LISTEN 0 5 [::]:4713 [::]:* users:(("pulseaudio",pid=2962036,fd=36))
# Starts listening on localhost for remote connections from other users
`/etc/pulse/default.pa`
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
# For each user launching application, create/add to the Pulse client.conf
@akissu
akissu / 10-gpu.conf
Created April 1, 2019 20:25
Basic switchable eGPU X11 config that supports hotplugging
#startx
Section "ServerLayout"
Identifier "layout"
Screen 0 "intel"
Inactive "nvidia"
EndSection
#startx -- -layout egpu
Section "ServerLayout"
Identifier "egpu"
@akissu
akissu / arch.conf
Created January 28, 2019 05:23
Config files to perform PCI passthrough over Thunderbolt
title enter da virtual w0r1d
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options cryptdevice=UUID=a403fa05-b3c1-4d3e-864b-f3158ab74abc:root root=/dev/mapper/root intel_iommu=on iommu=pt rd.driver.pre=vfio-pci vfio-pci.ids=10de:1b81,10de:10f0,8086:15b6
#iommu_groups | grep -e "Group 13" -e "Group 14"
#IOMMU Group 13 03:00.0 PCI bridge [0604]: Intel Corporation DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015] [8086:1576]
#IOMMU Group 13 04:00.0 System peripheral [0880]: Intel Corporation DSL6340 Thunderbolt 3 NHI [Alpine Ridge 2C 2015] [8086:1575]
#IOMMU Group 14 03:01.0 PCI bridge [0604]: Intel Corporation DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015] [8086:1576]
@akissu
akissu / vfio-tb3.xml
Created January 27, 2019 20:03
Windows 10 VM with GTX 1070 and USB controller passthrough over Thunderbolt3 via Razer Core V1
<domain type='kvm'>
<name>win10</name>
<uuid>469d7b97-0a2f-4f25-80d6-36c14abe05b1</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>6000000</memory>
<currentMemory unit='KiB'>6000000</currentMemory>
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>cleangaming0-vfio</name>
<uuid>f99c99bc-d52c-4fa8-80db-f338a529e17e</uuid>
<memory unit='KiB'>6242304</memory>
<currentMemory unit='KiB'>6242304</currentMemory>
<vcpu placement='static'>8</vcpu>
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
<vcpupin vcpu='1' cpuset='3'/>
</cputune>
@akissu
akissu / watch-clipboards
Last active December 3, 2017 02:43
Print out all clipboards using xclip
#!/bin/sh
watch -t -n 0.5 \
'echo "XA_PRIMARY:"; \
xclip -selection primary -o; \
echo "\n\nXA_SECONDARY:"; \
xclip -selection secondary -o; \
echo "\n\nXA_CLIPBOARD:"; \
xclip -selection clipboard -o'
@akissu
akissu / cpinfo
Created March 11, 2016 23:57
Shell script that performs a cp of source to destination and watches the process.
#!/bin/sh
CPFILEPATH=`readlink -f $1`
CPDSTPATH=`readlink -f $2`
CPFILESIZE=`stat --printf "%s" $1`
echo $CPFILEPATH: $CPFILESIZE Bytes
echo cp $CPFILEPATH $CPDSTPATH/. "&"
cp $CPFILEPATH $CPDSTPATH/. &
CPPID=`echo $!`
@akissu
akissu / designer.html
Created August 22, 2014 06:32
designer
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../topeka-elements/avatars.html">
<link rel="import" href="../topeka-elements/category-icons.html">
@akissu
akissu / designer.html
Created August 17, 2014 19:07
designer
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="post-card">
<template>
<style>
:host {
display: block;
position: relative;
padding: 20px;
@akissu
akissu / designer.html
Created August 17, 2014 06:24
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../topeka-elements/avatars.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">