Skip to content

Instantly share code, notes, and snippets.

@aquelito
aquelito / git-command.md
Last active May 7, 2024 13:42
GIT - Ligne de commande principale
title category
Git config
Git

Rappel

Ne pas oublier : l'aide en ligne de commande.

@xfournet
xfournet / pluginHttp2Proxy.ts
Last active May 7, 2024 13:42
Vite support for HTTP2 and proxy
import proxy from 'http2-proxy';
import type { Plugin, ProxyOptions } from 'vite';
export const pluginHttp2Proxy = (): Plugin => {
let routes: Record<string, string | ProxyOptions>;
return {
name: 'vite-plugin-http2-proxy',
config: (config) => {
const { server } = config;
routes = server?.proxy ?? {};
@imba-tjd
imba-tjd / .Cloud.md
Last active May 7, 2024 13:41
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@jonasjelonek
jonasjelonek / main.rs
Last active May 7, 2024 13:41
Minstrel rate to MCS info
const CCK_RATES: [u16; 4] = [ 10, 20, 55, 110 ];
const OFDM_RATES: [u16; 8] = [ 60, 90, 120, 180, 240, 360, 480, 540 ];
fn print_legacy_rate(rate: u16) {
let idx: u8 = (rate & 0xf) as u8;
let minstrel_group = (rate >> 4) as u8;
let cck: bool = (minstrel_group == 16);
let modulation = if cck { "CCK" } else { "OFDM" };
let bitrate = if cck {
@unixfox
unixfox / readme.md
Last active May 7, 2024 13:38
How to get IPv4 connectivity on an IPv6 only VPS

Some hosting providers like scaleway allows to remove the IPv4 from the VPS in order to save 1€/month but doing this will result in losing connectivity to the "IPv4 world".
Or you may have ordered a VPS that only has IPv6 connectivity and you want to access to a resource only accessible from the "IPv4 world".
Here is how to gain your access back to the "IPv4 world".

Change your name servers(s) to DNS64 name servers(s)

Note: You may deploy your own DNS64 & NAT64 server on a separate server by following this tutorial (untested): https://packetpushers.net/nat64-setup-using-tayga/.
Note²: You may find a explanation of what is NAT64 and DNS64 on Wikipedia.

  1. Choose a/multiple DNS64 public server(s) that has/have its own NAT64 public service from this list:
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active May 7, 2024 13:38
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@LasseR15
LasseR15 / README.md
Last active May 7, 2024 13:37
Install Steam in a unprivileged LXC in Proxmox with GPU passthrough

Install Steam in a unprivileged LXC in Proxmox with GPU passthrough

Tested working features/Setup notes

  • Using KasmVNC as a vnc server (access the desktop via your browser)
  • Unprivileged LXC in Proxmox 7.4 (no extra features enabled)
  • Running Debian 12
  • AMD APU passthrough from host CPU (should also work with Intel and Nvidia, but haven't tested it)
  • Linux native aswell as Windows (Proton) games

My Hardware-Setup

@ThioJoe
ThioJoe / Appx-Uninstaller.ps1
Last active May 7, 2024 13:37
A basic script for uninstalling a list of app packages in Windows 10/11, including those pre-installed with Windows
# A basic script for uninstalling app packages in Windows 10/11, including those pre-installed with Windows
#
# Note: If you get an error about the script not being allowed to run, the below command will change the execution polciy temporarily for one session only:
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
#
# To execute the script, open a Powershell window to the directory with the script and run the following command using your scripts file name (and don't forget the .\ )
# .\WhateverScriptName.ps1
# -------------------------------------------------------------------------------------------
# Script by ThioJoe - https://github.com/ThioJoe
@journey-ad
journey-ad / 2233.zenra.js
Last active May 7, 2024 13:36
哔站直播间的2233娘挂件替换为全裸版本
// ==UserScript==
// @name 哔站直播全裸2233娘
// @description 哔站直播间的2233娘挂件替换为全裸版本
// @description:zh-TW 嗶站直播間的2233娘掛件替換為全裸版本
// @namespace https://github.com/journey-ad
// @author journey-ad
// @include *://live.bilibili.com/*
// @require https://cdn.jsdelivr.net/jquery/1.12.4/jquery.min.js
`--> TORCH_LOGS="output_code" python optim_repro.py
[WARNING]:Profiler function <class 'torch.autograd.profiler.record_function'> will be ignored
[DEBUG]:Output code:
# AOT ID: ['0_inference']
from ctypes import c_void_p, c_long
import torch
import math
import random
import os