Skip to content

Instantly share code, notes, and snippets.

@sovajri7
sovajri7 / Plex_Hetzner_Wireguard.md
Created November 4, 2023 18:26
Using Plex on Hetzner with Wireguard VPN (Docker).

Using Plex on Hetzner with Wireguard VPN (Docker). First, thanks to ShipkaChalk (https://gist.github.com/ShipkaChalk/629fdc42dad781776d2007fc502188f3) and his original tutorial that helped me a lot to get the client part. With this tutorial, you can route all Plex traffic via Wireguard out of another VPS (2$ IONOS Ubuntu VPS), this can be used for any container but here to bypass the Hetzner block by Plex.

  1. Get yourself a Linux VPS (ex : Ubuntu 22.04)

  2. Make all updates :

sudo apt update

app.use("/graphql", (req, res, next) => {
const startHrTime = process.hrtime();
res.on("finish", () => {
if (req.body && req.body.operationName) {
const elapsedHrTime = process.hrtime(startHrTime);
const elapsedTimeInMs =
elapsedHrTime[0] * 1000 + elapsedHrTime[1] / 1e6;
logger.info({
type: "timing",
@andrew-yang0722
andrew-yang0722 / torch_max_example_classification.py
Created September 12, 2017 11:52
PyTorch Classification Evaluation Example
import torch
label = torch.LongTensor([4,1])
out_mat = torch.FloatTensor(
[[0.1, 0.1, 0.1, 0.1, 0.5],
[0.6, 0.1, 0.1, 0.1, 0.0]])
print "out_mat", out_mat
@tuxfight3r
tuxfight3r / vim-shortcuts.md
Last active May 3, 2024 05:11
VIM SHORTCUTS

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)
@jo-chemla
jo-chemla / ffmpeg-360-equirect-cubemap-persp.sh
Created September 11, 2023 16:35
Ffmpeg commands using v360 filter to convert between equirectangular equirect cubemap persp etc
# ffmpeg combo: equirect-to-cubemap (standard 6 faces + yaw:45° 4 horiz faces)
ffmpeg -i input.mp4 -filter_complex [0:v]split=2[in1][in2];[in1]v360=equirect:c3x2:out_forder=frblud,untile=3x2[out1];[in2]v360=equirect:c6x1:out_forder=frblud:yaw=45,crop=4/6*in_w:in_h:0:0,untile=4x1[out2] -map [out1] cubemap2\cubemap_frblud_%05d.jpg -map [out2] cubemap2\cubemap_45_frbl_%05d.jpg
# from equirectangular to standard cubemap
ffmpeg -i input.mp4 -vf "v360=equirect:c3x2:out_forder=frblud,untile=3x2" cubemap\cubemap_frblud_%05d.jpg
# from equirectangular to standard yaw:45° cubemap (no top/bottom)
ffmpeg -i input.mp4 -filter_complex "v360=equirect:c6x1:out_forder=frblud:yaw=45,crop=4/6*in_w:in_h:0:0,untile=4x1" cubemap\cubemap_45_frbl_%05d.jpg
# from equirectangular to 90° rectilinear persp
ffmpeg -i input.mp4 -vf "v360=e:rectilinear:h_fov=90:v_fov=90" output.mp4
@m-Phoenix852
m-Phoenix852 / index.user.js
Last active May 3, 2024 05:09
Userscript to login to discord accounts with ease, just do SHIFT + T at the login page and enter the token!
// ==UserScript==
// @name Discord Token Login
// @namespace https://gist.github.com/m-Phoenix852/d63d869f16e40dac623c9aa347e8641a/
// @version 1.1
// @description Taking over discord's tokens!
// @author Phoenix852
// @match *://discord.com/login
// @updateURL https://gist.github.com/m-Phoenix852/d63d869f16e40dac623c9aa347e8641a/raw/6d1ee63df17685e4ea06018bd8b47541d4261b82/index.user.js
// @grant none
// @iconURL https://i.imgur.com/rI8GsTz.png
Compiling/installing the mesa virtio-venus-driver-(below done with new linux container)
For: Chrome OS crostini-default debian container bookworm
Best viewed in "raw" format
In chrome browser type or paste
chrome://flags
@mwaskom
mwaskom / replacing_seaborn_distplot.ipynb
Last active May 3, 2024 05:04
A guide to replacing the deprecated `seaborn.distplot` function.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@y56
y56 / How to install Japanese Input in Linux (tutorial)
Created April 9, 2020 20:52
How to install Japanese Input in Linux (tutorial)
https://www.reddit.com/r/linux/comments/byugan/how_to_install_japanese_input_in_linux_tutorial/
==
How to install Japanese Input in Linux (tutorial)
Introduction:
Hello, my name is Eitan. I am new to linux but i am learning rapidly.
I want to contribute to the community by writing a tutorials for things that might sound easy and unnecessary but for some it might help a lot. if you see that i wrote something wrong please be sure that your write in the comments so i will fix myself.
(This tutorial was tested on debian based oses)
@ih2502mk
ih2502mk / list.md
Last active May 3, 2024 04:57
Quantopian Lectures Saved