Skip to content

Instantly share code, notes, and snippets.

print('hello')
export DEV_ROOT=/dev/sda7
umount $DEV_ROOT
mkfs.ext4 $DEV_ROOT
mkdir /mnt/installer
mount $DEV_ROOT /mnt/installer
ln -s /mnt/installer /mnt/funtoo
#開始下載stage3
cd /mnt/funtoo
wget http://build.funtoo.org/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz
tar xpf stage3-latest.tar.xz
cd /mnt/funtoo
wget http://build.funtoo.org/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz
tar xpf stage3-latest.tar.xz
export ROOT_UUID=$(blkid /dev/sda7 -s UUID -o value)
export HOME_UUID=$(blkid /dev/sda5 -s UUID -o value)
echo UUID=$ROOT_UUID / ext4 errors=remount-ro 0 1
echo \#UUID=$HOME_UUID /home ext4 defaults 0 2
cp /etc/resolv.conf /mnt/funtoo/etc/
cd /mnt/funtoo
mount -t proc none proc
mount --rbind /sys sys
mount --rbind /dev dev
chroot /mnt/funtoo
MAKEOPTS="-j2"
VIDEO_CARDS="nvidia"
USE=""
@rbn42
rbn42 / QtMultimedia2fifo.py
Last active November 4, 2019 04:43
An ugly example of writing to fifo file.
from PySide2 import QtMultimedia,QtWidgets
from PySide2.QtCore import QTimer,QFile,QIODevice
import sys
import os
import numpy as np
SAMPLE_RATE = 44100 # [Hz]
SAMPLE_SIZE = 16 # [bit]
CHANNEL_COUNT = 2
@rbn42
rbn42 / panon41.py
Last active January 25, 2021 11:58
class SoundCardSource:
def __init__(self, channel_count, sample_rate, device_id, fps):
self.channel_count = channel_count
self.sample_rate = sample_rate
self.device_id = device_id
self.blocksize = self.sample_rate // fps
self.start()