Skip to content

Instantly share code, notes, and snippets.

View x1unix's full-sized avatar
:shipit:
Work in progress

Denys Sedchenko x1unix

:shipit:
Work in progress
View GitHub Profile
@myyc
myyc / arch_linux_install_guide.md
Last active April 21, 2024 03:12
Arch Linux setup with all the good stuff (Plymouth, encryption, systemd-boot etc.)

Hope this will stay relevant for longer than just 2021. This guide will focus mostly on things you shouldn't overlook and will harshly prioritise assuming that you're running on recent hardware. EFI and all that.

Always refer to the official guide in case of doubt.

First things first

One important thing first: the environment you will encounter on the live image is very different from what you'll end up installing, some things are significantly easier there: e.g. wifi tools come pre-installed, the default shell is a pimped zsh with nice completions, and so on. We'll keep this

@laurentbel
laurentbel / !Loki nginx basic authentication.md
Last active December 31, 2023 15:33
Loki Nginx basic authentication

Loki secured with basic authentication using Nginx

Basic setup to protect loki with basic authentication using Nginx

@laurentbel
laurentbel / !Nginx Basic Auth.md
Last active April 10, 2024 21:05
Nginx reverse proxy with basic authentication

Nginx Basic Auth

A simple demo of using Nginx as a reverse proxy to add basic authentication.

@AlexCzar
AlexCzar / dropdown_tabbed_alacrity.sh
Last active July 22, 2021 17:04
Tabbed DropDown Alacritty for X11
#!/bin/sh
# Author: https://github.com/AlexCzar
# License: Apache 2.0
# This script can be used as a launcher for alacritty-inside-tabbed
# It monitors window manager events and when detects that tabbed has
# lost focus, script will minimize tabbed.
# If alacritty-in-tabbed is not running, it will launch it, if it is
# running but isn't focused, script will give it focus, if it is running
# and is focused, script will minimize it.
@akella
akella / noise.glsl
Created January 24, 2021 08:42
noise4d
//
// Description : Array and textureless GLSL 2D/3D/4D simplex
// noise functions.
// Author : Ian McEwan, Ashima Arts.
// Maintainer : ijm
// Lastmod : 20110822 (ijm)
// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
// https://github.com/ashima/webgl-noise
//
# IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX
#
# WIP research. (This was edited to add more info after someone posted it to
# Hacker News. Click "Revisions" to see full changes.)
#
# Copyright (c) 2020 dougallj
# Based on Python port of VMX intrinsics plugin:
# Copyright (c) 2019 w4kfu - Synacktiv
@tinywrkb
tinywrkb / btswitch
Last active February 6, 2024 10:09
NOT NEEDED WITH 0.3.21 OR GIT VERSION | PipeWire Pulse Server Bluetooth Auto-Switch
#!/bin/bash
#
# ~/.local/bin/btswitch
#
# wait a second this is too fast for udev
sleep 1
btdev="$(pactl list sinks|grep Name|grep 'bluez.*.a2dp.sink'|sed 's/Name: //'|sed 's/\s//')"
if [ -n "$btdev" ]; then

Hacking the SX Core modchip

Background

On October 2nd 2020, CVE-2020-15808 was publicly announced, detailing an out-of-bounds memory read/write vulnerability in STM's microcontroller firmware. Any chip containing STM's USB CDC driver library contains the bugged code, which represents a large amount of products on the market. While bugged STM libraries may be bad enough, this problem is much more widespread. Several companies manufacture "clones" of STM chips which, due to mostly identical MMIO (Memory Mapped Input/Output) addresses, fully support the affected STM vendor code. Most clone manufacturers don't offer their own libraries, so developers must either write their own from scratch, or they can use the STM's existing libraries, and most clone manufacturers encourage this.

Armed with this information, I became interested in exploiting and dumping the flash on the "Team Xecuter" SX Core modchip for the Nintendo Switch. The MCU used on the ch

@zipmegabyte
zipmegabyte / Disable Device Enrolment Notification on MacOS.md
Last active March 31, 2021 21:34
Disable Device Enrolment Notification on MacOS without messing with the readonly filesystem

Disable Device Enrolment Notification on MacOS in 4 easy steps

Attention: Doesn't seem to work. More investigation is necessary. Will update if able to fix.

1. Open Terminal.app

2. Copy the readonly plist file to your userspace

mkdir ~/Library/LaunchDaemons
import 'dart:async';
import 'dart:convert';
import 'dart:ffi';
import 'dart:io';
import 'package:ffi/ffi.dart';
import 'package:win32/win32.dart';
const healthOffset = 0x12FC58;