Skip to content

Instantly share code, notes, and snippets.

View TobleMiner's full-sized avatar
🔥

Toble_Miner/tsys TobleMiner

🔥
  • Kiel
View GitHub Profile
From: Andreas Ziegler <[email protected]>
Date: Sat, 4 Aug 2018 01:56:39 +0200
Subject: [PATCH] base-files: sysupgrade: abort if config backup fails
Signed-off-by: Andreas Ziegler <[email protected]>
---
package/base-files/files/sbin/sysupgrade | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
@TobleMiner
TobleMiner / getgwaddr.sh
Last active July 24, 2018 00:12
Get gateway address of gluon devices using an additional respondd service
gwid="`batctl gwl | grep '=>' | cut -d' ' -f2 | tr -d ':'`"
[ -z "$gwid" ] && exit 1
gluon-neighbour-info -p 1001 -d ff02::1 -i bat0 -r gateway | \
while read resp; do
node_id="`echo "$resp" | jsonfilter -e '$.node_id'`"
if [[ "$node_id" == "$gwid" ]]; then
echo "$resp" | jsonfilter -e '$.address.ipv4'
fi
@TobleMiner
TobleMiner / pivot_services.sh
Last active February 3, 2024 17:29
OpenWrt switch to ramfs
#!/bin/sh
. /lib/functions.sh
. /lib/functions/system.sh
kill_remaining() { # [ <signal> [ <loop> ] ]
local loop_limit=10
local sig="${1:-TERM}"
local loop="${2:-0}"
@TobleMiner
TobleMiner / 46-avr.rules
Created May 2, 2018 12:00
AVR Dragon udev rules
# udev rules file for ATMEL AVR isp
#
ACTION!="add|change", GOTO="avrisp_rules_end"
SUBSYSTEM!="usb|usb_device", GOTO="avrisp_rules_end"
# AVR Dragon v1
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2104", MODE="0660", GROUP="plugdev"
# AVR Dragon v2 (the one without shitty voltage regulators)
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2107", MODE="0660", GROUP="plugdev"
===================================================================
' '' '' '' '' '\t\tMT7621' '' '' 'stage1' 'code' '10:33:55' '(ASIC)
' '' '' '' '' '\t\tCPU=500000000' 'HZ' 'BUS=166666666' 'HZ
==================================================================
Change' 'MPLL' 'source' 'from' 'XTAL' 'to' 'CR...
do' 'MEMPLL' 'setting..
MEMPLL' 'Config' ':' '0x11100000
3PLL' 'mode' '+' 'External' 'loopback
===' 'XTAL-40Mhz' '===' 'DDR-1200Mhz' '===
PLL3' 'FB_DL:' '0x7COMMA' '1/0' '=' '517/507' '1D000000
@TobleMiner
TobleMiner / vardump.lua
Last active December 8, 2017 21:36
Lua vardump with cycle detection
_G['vardump'] = function(var, longform, prefix, refs)
prefix = prefix or ''
refs = refs or {}
if type(var) == 'table' then
local cyclic = not not refs[var]
refs[var] = true
print(prefix .. tostring(var) .. (cyclic and ' (cyclic)' or ''))
if not cyclic then
prefix = prefix .. ' '
@TobleMiner
TobleMiner / README.md
Last active September 10, 2018 00:13
KVMGT on a Core i7-6600U (Skylake) with libvirt and QEMU

KVMGT

This test was done on an ArchLinux installation with Kernel 4.13.3-1

Also I will be using the terms vGPU, KVMGT graphics card and (Intel) virtual GPU interchangeably. The do all refer to Intel GVT-G KVMGT.

In contrast the term emulated GPU or emulated graphics card refer to generic software GPU solutions like QXL or virtio-gpu.

Preparing the host

NSM2:

  • size: 27.8 x 8.0 x 3.0 (6.0) (H x B x T (with pole mount)) [cm]

NS loco M2:

  • size: ?
smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Red (AF)
Device Model: WDC WD20EFRX-68AX9N0
Serial Number: WD-WMC301016388
LU WWN Device Id: 5 0014ee 058db411f
Firmware Version: 80.00A80
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
client
remote '10.42.0.225'
ca '/.crt'
cert '.crt'
key '/.key'
auth SHA256
cipher AES-256-CBC
comp-lzo yes
float
dev vpn-ffki