Skip to content

Instantly share code, notes, and snippets.

View rootfs's full-sized avatar
🎯
Focusing

Huamin Chen rootfs

🎯
Focusing
View GitHub Profile
@rootfs
rootfs / a2dp_sink_ubuntu_linux.md
Created September 24, 2023 18:42 — forked from joergschiller/a2dp_sink_ubuntu_linux.md
A2DP Sink on Ubuntu Linux with bluez (streaming bluetooth stereo audio from smartphone to pc)

Howto Enable and Use A2DP Sink on Ubuntu Linux with Bluez

  1. Add Enable=Source to /etc/bluetooth/audio.conf right after [General].

  2. Find address in form XX:XX:XX:XX:XX:XX of phone with hcitool scan.

  3. Pair and trust smartphone with sudo bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX and sudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes.

  4. Create loopback in pulseaudio connection bluetooth a2dp source with alsa sink:

@rootfs
rootfs / _README.md
Created September 24, 2023 18:41 — forked from oleq/_README.md
A2DP audio streaming using Raspberry PI (Raspbian Jessie)

What is this all about?

This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.

   Audio source (i.e. smartphone) 
                |
                v
 (((  Wireless Bluetooth Channel  )))
 |

Microshift

Storage provisioner

cat << EOF | kubectl apply -f -
apiVersion: v1
kind: PersistentVolume
metadata:
  name: hostpath-provisioner
@rootfs
rootfs / Windows-qemu-KVM.10.xml
Created January 31, 2021 22:04
Windows 10 qemu/kvm optimizations CPU usage #virt-manager
<domain type="kvm">
<!-- https://www.reddit.com/r/VFIO/comments/80p1q7/high_kvmqemu_cpu_utilization_when_windows_10/ -->
<!-- https://github.com/duncanthrax/scream -->
<!-- https://gitlab.com/YuriAlek/vfio -->
<!-- https://github.com/PiMaker/Win10-VFIO -->
<!-- https://gitlab.com/YuriAlek/vfio -->
<!-- https://github.com/sk1080/nvidia-kvm-patcher -->
<!-- https://github.com/T-vK/MobilePassThrough -->
@rootfs
rootfs / kubernetes_add_service_account_kubeconfig.sh
Created October 2, 2019 23:26 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
############################################################
## Using Genetic Algorithms in Quantitative Trading
##
## thertrader@gmail.com - Mar 2014
############################################################
library(PerformanceAnalytics)
library(rgenoud)
library(quantmod)
library(TTR)