Skip to content

Instantly share code, notes, and snippets.

@jvanveen
jvanveen / steamdeck.sh
Last active March 31, 2023 05:52
Steamdeck developer setup (Steamos with chroot)
# Source: https://bbs.archlinux.org/viewtopic.php?id=280521
# Enable sudo by going into Settings/Users and setting a password
mkdir ~/code/arch
sudo mount --bind ~/code/arch /mnt # (pacman has trouble measure free disk space without mounting)
sudo pacstrap -KM /mnt base linux linux-firmware neovim reflector # (note that packages will come from steam's repos, which is also why I used -M to avoid inheriting those)
sudo arch-chroot /mnt
reflector > /etc/pacman.d/mirrorlist
nvim /etc/pacman.conf # and enable parallel downloads, color smile
# your keyring will probably be wrong, so rm -rf /etc/pacman.d/gpg then pacman-key --init and pacman-key --populate
pacman -Sy archlinux-keyring
@jvanveen
jvanveen / gist:64be78833f2f35c5b4dc6561fb6c5e96
Last active September 14, 2021 17:35
Pinephone tweaks (Plasma mobile)
# Overclock GPU
pacman -S dtc vim
dtc -I dtb -O dts /boot/dtbs/allwinner/sun50i-a64-pinephone-1.2.dtb -o /boot/dtbs/allwinner/sun50i-a64-pinephone-1.2.dts
vim /boot/dtbs/allwinner/sun50i-a64-pinephone-1.2.dts
# Search for gpu@, modify assigned-clock-rates from 0x19bfcc00(432mhz) to 0x1dcd6500 (500mhz)
dtc -I dts -O dtb /boot/dtbs/allwinner/sun50i-a64-pinephone-1.2.dts -o /boot/dtbs/allwinner/sun50i-a64-pinephone-1.2.dtb
# Overclock RAM, 624 caused crashes on this Pinephone; another might work
cp /boot/u-boot-sunxi-with-spl-pinephone-624.bin /boot/u-boot-sunxi-with-spl-pinephone.bin
https://wiki.pine64.org/wiki/Overclocking
@jvanveen
jvanveen / gist:783c6f51f6281d499b1368c2c461219c
Created November 15, 2020 16:01
Sync Sony Bravia tv datetime
# Fixes ethernet failure due to out-of-sync clock (unable to set from UI)
adb connect 192.168.1.4
adb shell settings put global auto_time 1
@jvanveen
jvanveen / gist:26026e78010889a26bc85c01e61b0294
Last active September 11, 2020 15:13
ion-sfu gprc/json-rpc
// Package cmd contains an entrypoint for running an ion-sfu instance.
package main
import (
"context"
"encoding/json"
"errors"
"flag"
"fmt"
"io"
Prerequisites
=============
- One Pinephone braveheart edition
- A micro SIM card or Nano sim with micro adapter
- A micro SD card (tested with SanDisk Ultra microSDXC UHS-1 64G)
- A 5V power adapter with regular usb connector (15 Watts recommended. 5V/3 amp)
- A Linux desktop/laptop to prepare the SD card (laptop used in this tutorial)
Preparation
@jvanveen
jvanveen / gist:9bb6121c3dfb60336f9d301768a1f1c9
Created June 21, 2019 09:26
Generate CA and Certificate for development
#!/bin/bash
if [ -z "$1" ]; then
echo -e "\nPlease call '$0 <domain-name>' to run this command!\n"
exit 1
fi
PW=dummypw
CA=dev.ca
SUBJ="/C=NL/ST=City/L=City/O=My Company/OU=IT Department/CN=$1"
SUBJCA="/C=NL/ST=City/L=City/O=My Company/OU=IT Department/CN=My Company CA"
@jvanveen
jvanveen / arch-linux-install
Last active December 16, 2019 13:26 — forked from mattiaslundberg/arch-linux-install
Arch linux install on UEFI laptop with LUKS encryption & KDE plasma
wget http://ftp.nluug.nl/os/Linux/distr/archlinux/iso/2019.12.01/archlinux-2019.12.01-x86_64.iso
# Write image to a usb-drive
dd if=archlinux-2019.12.01-x86_64.iso of=/dev/sda bs=4M status=progress oflag=sync
# Disable secure boot in BIOS. Switch to AHCI if SCSI is enabled.
# Boot from USB.
# This assumes a wifi only system...
wifi-menu
# Create partitions