Skip to content

Instantly share code, notes, and snippets.

@SkyyySi
SkyyySi / youtube-vanced-alternatives.md
Last active May 23, 2024 16:23
A list of alternatives after the shutdown of Vanced

NONE OF THESE CLIENTS ARE VERIFIED BY ME FOR SECURITY OR ANYTHING ELSE! USE AT YOUR OWN RISK!

These are the current alternatives (with links when possible):

@davidfowl
davidfowl / .NET6Migration.md
Last active April 11, 2024 02:02
.NET 6 ASP.NET Core Migration
@codehz
codehz / iprule.sh
Last active March 4, 2024 09:39
nftables for redir proxy
ip rule add fwmark 0x233 lookup 100
ip route add local 0.0.0.0/0 dev lo table 100
@PascalSenn
PascalSenn / auth-apollo-how-to.md
Last active March 31, 2023 12:20
Authentication Apollo Client - How To

The problem with authentication of web sockets is that you can only authenticate a http request once against a authentication scheme. After that the authentication is cached and will always yield the same result.

A web socket connection starts over HTTP. A HTTP request with the Upgrade header is send to the back end. This request is then "upgraded" into a web socket that runs over the web socket pipeline. The main issue with web sockets is that you cannot set additional headers with this initial HTTP header. Therefore the authentication will fail and the request will be unauthenticated. The HTTP context of the initial request will last as long as the web socket connection is running.

The trick we do is that we add a stub authentication scheme:

@KrzysztofPrzygoda
KrzysztofPrzygoda / iframes.css
Last active May 17, 2021 04:24
Workaround to iOS WebKit iframe bugs (including Bootstrap Popover) // source https://jsbin.com/mevurem
/*
Embracing iOS WebKit weirdness with iframes
**iOS WebKit iframe bug description**:
https://bugs.webkit.org/show_bug.cgi?id=155198
**My current findings**:
1. iOS WebKit resizes iframes to the full size of their content - it's a bug known since 2016 and still not resolved in iOS 11.
2. To fit iframe contents, its div container must have w/h defined in pixels - any relative measures (like %, vw/vh) doesn't work.

Problem

In Arch Linux mkinitcpio -p linux

shows

Possibly missing firmware for module: aic94xx
 Possibly missing firmware for module: wd719x
@tejom
tejom / hello-world.cc
Created November 24, 2016 01:42
console.log v8
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fstream>
#include <iostream>
@carcinocron
carcinocron / debugger pause beforeunload
Last active April 25, 2024 16:48
Chrome: pause before redirect
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)
@mitchwongho
mitchwongho / Docker
Last active November 29, 2023 06:36
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash