Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Andrey Arapov arno01

🎯
Focusing
View GitHub Profile
View diff.md
  • roadrunner2/macbook12-spi-driver is at commit 3b58c7b3b2e814abd5347372d842328c88801f76 (HEAD -> touchbar-driver-hid-driver, origin/touchbar-driver-hid-driver, origin/HEAD)
  • torvalds/linux is at commit b0be0eff1a5ab77d588b76bd8b1c92d5d17b3f73 (HEAD -> master, origin/master, origin/HEAD)
[user@personal linux]$ diff -Nur ~/git/macbook12-spi-driver/applespi.c ~/git/linux/drivers/input/keyboard/applespi.c | xclip -selection clipboard
--- /home/user/git/macbook12-spi-driver/applespi.c	2020-01-28 13:15:41.561000000 +0100
+++ /home/user/git/linux/drivers/input/keyboard/applespi.c	2020-01-28 13:07:22.311000000 +0100
@@ -48,15 +48,12 @@
 #include <linux/efi.h>
 #include <linux/input.h>
View 23-Jan-2020-qubes-r40-build-error.md

make python-xcffib

[user@build qubes-builder]$ make python-xcffib
Currently installed dependencies:
python2-pyyaml-5.1-1.fc30.x86_64
createrepo_c-0.15.5-1.fc30.x86_64
createrepo_c-0.15.5-1.fc30.x86_64
debootstrap-1.0.116-1.fc30.noarch
devscripts-2.19.3-1.fc30.x86_64
@arno01
arno01 / qubes-templates-4kn.md
Last active Feb 9, 2020
Build Qubes OS templates for 4096 bytes/sector disks
View qubes-templates-4kn.md

Build Qubes OS templates for 4096 bytes/sector disks

TAILORED: build 4k sector sized templates only

https://git.nixaid.com/QubesOS/qubes-linux-template-builder/commit/587c7bae95048701381599ec7bb0f1396ba1ffe2

Ref. https://github.com/QubesOS/qubes-issues/issues/4974

Notes

Make sure to have a Linux kernel >= 4.18-rc4, otherwise partprobe will not spawn the partitions (/dev/loopXpY) off the loop device created with the custom sector size (losetup: -b / --sector-size) not corresponding to the sector size of the backing disk.

View template-stretch.md

while building Qubes OS R4.1

[arno@20b6bde5a878 qubes-builder]$ cat build-logs/template-stretch.log 
...
...
Setting up file (1:5.30-1+deb9u3) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
grep: /proc/mounts: No such file or directory
grep: /proc/mounts: No such file or directory
@arno01
arno01 / README-setup-tunnel-as-systemd-service.md
Created Oct 30, 2019 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward
View README-setup-tunnel-as-systemd-service.md

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
View docker-on-android.md

WORK IN PROGRESS

Docker on Android

Setup:

Samsung Galaxy Tab S5e SM-T720
Android Pie on Linux 4.9.112 (not rooted)
Termux
@arno01
arno01 / 0-README.md
Last active Jan 17, 2019
Patches for fixing "black screen" issue on MBP with AMD GPU on Linux >=4.18
View 0-README.md
View gist:68b49dd79c6813788e590f7088d62dc3
2018/10/08 11:40:22 [DEBUG] ReferenceTransformer: "data.vsphere_datacenter.dc" references: []
2018/10/08 11:40:22 [DEBUG] ReferenceTransformer: "data.vsphere_host.host" references: [data.vsphere_datacenter.dc]
2018/10/08 11:40:22 [DEBUG] ReferenceTransformer: "data.vsphere_resource_pool.pool" references: [data.vsphere_datacenter.dc]
hableDataResource
data.vsphere_datacenter.dc - *terraform.NodeRefreshableDataResource
provider.vsphere - *terraform.NodeApplyableProvider
var.vsphere_password - *terraform.NodeRootVariable
var.vsphere_server - *terraform.NodeRootVariable
var.vsphere_user - *terraform.NodeRootVariable
provider.vsphere (close) - *terraform.graphNodeCloseProvider
View 00-Systemd_service_for_autossh.md

Usage

curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
  sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@.service | \
  sudo tee /etc/systemd/system/autossh@.service

sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh  # and copy your private key here
@arno01
arno01 / gist:535913090ffa65ce3dfaf67ac1e880d4
Created Jul 13, 2016
pulseaudio, deleted files in /dev/shm, grsecurity, etc...
View gist:535913090ffa65ce3dfaf67ac1e880d4
Workaround: pulseaudio client library likes to remove /dev/shm/pulse-shm-*
files created by the host, causing sound to stop working.
To fix this, we either want to disable the shm or mount /dev/shm
in read-only mode when starting the container.
echo "enable-shm = no" |tee -a /etc/pulse/client.conf
Q: But why it works in chroot?
A: chroot does not create a new pid namespace.
However, when a client runs in a sandbox that creates a new pid namespace,
pa_shm_cleanup() will remove all shm files, because kill() fails with ESRCH.
You can’t perform that action at this time.