Skip to content

Instantly share code, notes, and snippets.

@krcm0209
krcm0209 / README.md
Last active May 1, 2024 09:10
Using AdGuard DNS over HTTPS (DoH) on Windows 11

Why

You may want to use AdGuard's DNS over HTTPS[^2] service if you

  1. Want to make it harder for your ISP to know what websites you are requesting
  2. Want to block most traditional ads from your web browsing experience across your entire PC

Setup instructions

  1. Open PowerShell
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 1, 2024 09:08
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@Clybius
Clybius / index.html
Last active May 1, 2024 09:04
Embed AV1/No File Size Capped Videos in Discord
<head>
<meta property="og:image" content="GifToEmbedURL"> # Change the content to the link of a gif of your choice, which will be shown as the embed.
<meta property="og:type" content="video.other">
<meta property="og:video:url" content="VideoToEmbedURL"> # Change the content to the link of a video of your choice. Will work with videos over 50 MB, and even unsupported codecs such as AV1!
<meta property="og:video:width" content="1920"> # Set this to the video's width and height, not required, but will show the video as intended if the aspect ratio and size is correct.
<meta property="og:video:height" content="1080">
</head>
@mpusz
mpusz / alternatives.sh
Last active May 1, 2024 09:04
Ubuntu scripts
#/bin/bash
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo update-alternatives --remove-all clang
sudo update-alternatives --remove-all clang++
sudo update-alternatives --remove-all cc
sudo update-alternatives --remove-all c++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7
@hamelsmu
hamelsmu / webhook-circleback.py
Created April 25, 2024 04:59
Generate a project proposal automatically from a meeting transcript
from fastapi import Request, HTTPException
from pydantic import BaseModel, BaseModel, HttpUrl
from modal import Secret, App, web_endpoint, Image
from typing import Optional, List
from example import proposal
import os
app = App(name="circleback", image=Image.debian_slim().pip_install("openai", "pydantic", "fastapi"))
class Attendee(BaseModel):
@yanyongyu
yanyongyu / parser.yaml
Last active May 1, 2024 09:03
Clash For Windows parser for replacing rules
parsers:
- reg: ^.*$
code: >
module.exports.parse = async (raw, { yaml }) => {
const profile = yaml.parse(raw);
const proxies = profile.proxies;
const proxyNames = proxies.map((proxy) => proxy.name);
const proxyGroups = [
{
@RiadHossain43
RiadHossain43 / multi-tenancy.md
Last active May 1, 2024 09:06
MongoDB Multi Tenancy Approach

Stroy

Imagine you are building a simple project management application that has follwing simple features

  • Manage projects (your organisation may have multiple projects running)
  • Manage work packages related to a project
  • Manage members in your organisation that may need to have access to projects in your organisation.

Shared database approach

@Minionguyjpro
Minionguyjpro / Activate_Windows_8_8.1_10_and_11_Pro_for_Free.md
Last active May 1, 2024 09:02
Activate Windows 8, 8.1, 10 and 11 Pro for Free

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that has been upgraded to Windows 8/8.1/10/11 from Windows 8.1/8/7/Vista/XP and other ones. If you have one of those, refer the Windows key button to as yours. A list of them is below:

Windows key buttons

- Windows 11

- Windows 10

import torch
import torch._dynamo as torchdynamo
import torch._inductor
import time
import torch._inductor.config as config
from torch._dynamo.utils import cprofile_wrapper
from apex.optimizers import FusedAdam, FusedSGD
config.triton.cudagraphs = True
config.cpp_wrapper = False