Skip to content

Instantly share code, notes, and snippets.

View arturfog's full-sized avatar

Artur arturfog

  • Wroclaw, Poland
View GitHub Profile
@arturfog
arturfog / gist:4bf5834b49731136020c574e9bcfa1f8
Created September 19, 2021 19:50
Docker devices permissions
docker run -v /dev/bus:/dev/bus:ro -v /dev/serial:/dev/serial:ro -i -t --entrypoint /bin/bash debian:amd64
echo 'c 189:* rwm' > /sys/fs/cgroup/devices/docker/$A*/devices.allow
@arturfog
arturfog / vbox_phy_drive.sh
Created June 7, 2020 09:05
virtualbox use physical disk
VBoxManage internalcommands createrawvmdk -filename "</path/to/file>.vmdk" -rawdisk /dev/sda
@arturfog
arturfog / gist:795a2d79d6e364612dc9b4cf8e097acf
Created April 12, 2020 17:43
restore wireless network interface
sudo iw phy phy0 interface add wlan0 type managed
@arturfog
arturfog / chrome.sh
Created March 27, 2020 19:16
faster google chrome flags from raspbian
CHROMIUM_FLAGS="${CHROMIUM_FLAGS} --disable-quic --enable-tcp-fast-open --disable-gpu-compositing"
@arturfog
arturfog / opengl vsync disable
Created February 3, 2020 20:30
Disables opengl vsync
export vblank_mode=0
# https://github.com/vfdev-5/qemu-rpi2-vexpress
qemu-system-arm \
-kernel qemu-rpi2-vexpress/kernel-qemu-4.4.1-vexpress \
-dtb qemu-rpi2-vexpress/vexpress-v2p-ca15-tc1.dtb \
-m 2048M -M vexpress-a15 -cpu cortex-a15 -smp cpus=4,maxcpus=4 \
-serial stdio \
-append "rw console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 loglevel=8 rootwait fsck.repair=yes memtest=1" \
-sd ${IMG} \
-redir tcp:5022::22 \
-no-reboot
@arturfog
arturfog / notes.sh
Last active January 12, 2019 18:00
cross compile
sudo apt install crossbuild-essential-armhf && sudo apt install crossbuild-essential-arm64
sudo dpkg --add-architecture arm64
sudo dpkg --add-architecture armhf
sudo dpkg --print-foreign-architectures
-DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++
-DCMAKE_CXX_FLAGS:STRING="-Wno-unused-variable -Wno-unused-parameter" -DCMAKE_C_FLAGS:STRING="-Wno-unused-variable -Wno-unused-parameter"
@arturfog
arturfog / hdmi_audio.sh
Created January 7, 2019 16:01
alsa output hdmi
$ aplay -l
$ aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Left.wav
~/.asoundrc
pcm.!default {
type hw
card 1
device 3
}
@arturfog
arturfog / gnome-terminal-bold-fonts.sh
Created January 2, 2019 15:03
disable bold fonts in gnome terminal
dconf write /org/gnome/terminal/legacy/profiles:/:<id>/allow-bold false
@arturfog
arturfog / Anet+A6_settings.inst.cfg
Created December 4, 2018 19:41 — forked from maciekish/Anet+A6_settings.inst.cfg
Anet A6 profile for Cura 3.5. Start Cura once, create a custom printer called "Anet A6" without changing any of the settings and close Cura. Save and overwrite both files in "AppData\Roaming\cura\3.1\definition_changes" and start Cura again.
[general]
version = 4
name = Anet A6_settings
definition = custom
[metadata]
setting_version = 5
type = definition_changes
[values]