Skip to content

Instantly share code, notes, and snippets.

@yebekhe
yebekhe / sing-box-warp-conf-gen.ipynb
Last active May 21, 2024 20:25
WARP Sing-Box Config Generator
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mantasu
mantasu / install-cuda-tf-pytorch.md
Last active May 21, 2024 20:24
Tensorflow & Pytorch installation with CUDA (Linux and WSL2 for Windows 11)

Install Tensorflow & Pytorch with CUDA [Linux | WSL2]

Overview

This guide provides steps on how to install Tensorflow and Pytorch on Linux environment (including WSL2 - Windows Subsystem for Linux) with NVIDIA GPU support. Here I focus on Ubuntu 22.04 and WSL2 (Windows 11) but things should work on more/less recent/relevant versions. From what I've checked there are no full consistent guidelines, hopefully this one should clear things up (also serve as a reminder for me).

To install purely on Windows 10/11 (no WSL), I suggest to follow this tutorial.

GPU Setup

@tiensonqin
tiensonqin / config.edn
Created July 23, 2020 00:46
Logseq config.edn template
{:project {
;; Selected public notes can be published to https://logseq.com/your-project-or-your-username.
:name ""
:alias ""
;; your twitter handle
:twitter ""
;; description supports both hiccup and html
:description []}
;; Git settings
@2ik
2ik / cmd.bat
Last active May 21, 2024 20:17
Устранение ошибки в терминале VScode при запуске virtualenv
Ошибка:
.\venv\Scripts\activate : Невозможно загрузить файл C:\path\venv\Scripts\activate.ps1, так как выполнение сценариев отключено в этой системе.
Для получения дополнительных сведений см. about_Execution_Policies по адресу http://go.microsoft.com/fwlink/?LinkID=135170.
строка:1 знак:1
.\venv\Scripts\activate
~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : Ошибка безопасности: (:) [], PSSecurityException
FullyQualifiedErrorId : UnauthorizedAccess
Решение проблемы:
@JimmyCushnie
JimmyCushnie / UnityGraphicsBullshit.cs
Last active May 21, 2024 20:17
Exposes some Unity URP graphics settings that are (for some stupid fucking bullshit reason) private.
using System.Reflection;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using ShadowResolution = UnityEngine.Rendering.Universal.ShadowResolution;
/// <summary>
/// Enables getting/setting URP graphics settings properties that don't have built-in getters and setters.
## Description
Sometimes you need to parse CEF with logstash but it is wrapped in some other format, such as JSON or syslog. In this case, you can't use the CEF codec in the input, so you're doomed to do it yourself since there is not currently a CEF codec for filter blocks. Try this logstash recipe, it works well. Just rmeember a comma will break it- so feel free to replace "," with a more rare character like "|" or something...
## Context
At this point, the message has been processed so its a full CEF message starting in cef_message. Syslog "headers" were already removed in a previous step.
## Stripped from production
@davidfowl
davidfowl / dotnetlayout.md
Last active May 21, 2024 20:15
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@jngaravitoc
jngaravitoc / halo_dynamical_times.ipynb
Created May 21, 2024 20:09
Computation of the dynamical times in a MW-like DM halo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@garg-aayush
garg-aayush / Steps_multiple_cuda_environments.md
Last active May 21, 2024 20:09
Managing multiple CUDA versions using environment modules in Ubuntu

Steps to manage multiple CUDA environments

Latest Update: May 19th, 2024

This gist contains all the steps required to:

  • Install multiple CUDA versions (e.g., CUDA 11.8 and CUDA 12.1
  • Manage multiple CUDA environments on Ubuntu using the utility called environment modules.
  • Use this approach to avoid CUDA environment conflicts.

Environment Modules is a package that provides for the dynamic modification of a user's environment via modulefiles. You can find more on it at https://modules.readthedocs.io/en/latest/

@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active May 21, 2024 20:07
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)