Skip to content

Instantly share code, notes, and snippets.

@throwaway96
throwaway96 / crashd.md
Last active April 18, 2024 17:35
crashd instructions

News

Important: Dev Mode app patch and alternatives (2024-04-14)

Since approximately 2024-04-02, the latest LG Dev Mode app (2.1.2 in the Content Store) copies and resets the permissions of jail_app.conf/jail_app.conf.sig on every boot. Therefore, jailpatch.sh etc. will no longer work.

If you have webOS 5+ and old enough firmware, WTA (which does not require Dev Mode) will still work.

If you have webOS 4.x, you can try CVE-2023-6319. It is unpatched on the latest (final?) firmware for webOS 4.0 (2018) models.

#!/bin/bash
# upgpkg: Upgrades package versions in PKGBUILD and starts build.
# Author: Abhishek Dasgupta <abhidg at gmail.com>
# Thanks to cactus, profjim and daenyth for all the sed help!
# Edited: Florian Pritz <flo at xinu.at>
# I place this script in the public domain.
VERSION=0.4
// SPDX-License-Identifier: GPL-2.0
/*
* quick and dirty tool to present a DualSense-like virtual USB HID device bridging
* an actual bluetooth-connected DualSense.
*
* Compile with `gcc dualsense-bridge.c -ludev -lz
*
* It's adapted from Linux's UHID Example
*
* Copyright (c) 2012-2013 David Herrmann <dh.herrmann@gmail.com>
@fernandoherreradelasheras
fernandoherreradelasheras / smart-video-cutter.sh
Created February 26, 2022 17:01
Smart video cutter with minimal transcoding using ffmpg
#!/usr/bin/bash
#
# Cut a fragment of a video with the minimal possible re-encoding.
# If the new start point is not a key frame it reencodes the video
# from that point until the frame before a new keyframe. The remaining
# part is copied as passthrough and both fragments are concatenated
#
# In order to make the video streams compatible we use the same codec
# and bitrate. This works fine with h264. No idea about other codecs
@plembo
plembo / upnper4dont.md
Last active February 4, 2024 07:09
UPnP with EdgeRouter: Don't do it! Ubiquiti. ER-4.

Want to configure UPnP on EdgeRouter-4?

Don't do it!

Introduction

As a former sysadmin that once helped ride herd over around 1,000 servers, of which around 10% were Internet-facing, I've never been a fan of autoconfiguation when it comes to punching holes through the firewall. I've seen the tripwire logs, and it's sobering.

The Problem

So enabling UPnP on my EdgeRouter-4 wasn't something I had on the roadmap, but when I ran into difficulty getting DLNA to work on the default VLAN, I thought it was worth looking into (never mind that, as I later learned, having UPnP turned on wasn't going make a bit of difference on my local network: another reason that mastering theory should always come before practice).

@sxiii
sxiii / WormsWMD-Archlinux.md
Last active April 14, 2024 14:21
How to fix Worms W.M.D. launch on ArchLinux, Manjaro, Garuda, Artix Linux & Linux Mint

Game information Worms W.M.D.

Distribution name and version where applicable Manjaro 20.1.1 (Mikah)

Problem description Worms doesn't launch out of the box without two small tweaks. When launching Worms W.M.D. in Manjaro and Archlinux, you need to do two things:

  1. Install this apps: sudo pacman -S libcurl-gnutls libidn11 qt5-base qt5-xcb-private-headers(If you are on any other distro then Arch, you can skip this step. At least this is reported to be OK to skip for Linux Mint)
@ajmassi
ajmassi / LXCBindMount.md
Last active March 31, 2024 04:13
Create a bind mount from a Proxmox host on an unprivileged lxc container

Proxmox Assign Bind Mount To Unprivileged Container

In order for the LXC container to have full access the proxmox host directory, a subgid is set as owner of a host directory, and an ACL is used to ensure permissions.

Bind Mount dataset to LXC

Add the following line to /etc/pve/lxc/<CT_ID>.conf

mp0:/mount/point/on/host,mp=/mount/point/on/lxc

Create group on host

In the default Proxmox configuration, unpriviliged container subgids will have the prefix "10" followed by the expected 4-digit gid.

@adymitruk
adymitruk / conways-game-of-life.fish
Last active April 28, 2020 07:48
Conway's game of life in fishshell
set DEAD " "; set LIVE "🌱"; set wid 21; set hei 21
for cell in b(seq 2)r(seq $hei)c(seq $wid); set -g $cell $DEAD; end
set -g flip 1; set -g flop 2
function show_board
for row in (seq $hei); for col in (seq $wid); set -l cell b{$flip}r{$row}c{$col}; echo -n $$cell
end; echo; end; end
set b1r10c10 $LIVE; set b1r10c11 $LIVE; set b1r10c12 $LIVE;
set b1r11c10 $LIVE; set b1r11c12 $LIVE;
set b1r12c10 $LIVE; set b1r12c11 $LIVE; set b1r12c12 $LIVE;
while true
@julianxhokaxhiu
julianxhokaxhiu / create-iso.sh
Last active March 25, 2024 16:15
Simple bash script to create a Bootable ISO from macOS Catalina Install Image from Mac App Store
#!/usr/bin/env bash
#===========================================================================
# Works only with the official image available in the Mac App Store.
# Make sure you download the official installer before running this script.
#===========================================================================
hdiutil create -o /tmp/Catalina.cdr -size 9000m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Catalina.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build --nointeraction
hdiutil detach "/Volumes/Install macOS Catalina"
@kevinoid
kevinoid / .bashrc
Created July 31, 2019 16:31
GnuPG pinentry script for terminal or graphical interface based on $PINENTRY_USER_DATA.
# ~/.bashrc: executed by bash(1) for non-login shells.
# If file exists (likely) copy fragment below into existing script:
# If stdin is a terminal
if [ -t 0 ]; then
# Set GPG_TTY so gpg-agent knows where to prompt. See gpg-agent(1)
export GPG_TTY="$(tty)"
# Set PINENTRY_USER_DATA so pinentry-auto knows to present a text UI.
export PINENTRY_USER_DATA=USE_TTY=1