Skip to content

Instantly share code, notes, and snippets.

@disler
disler / README.md
Last active January 6, 2025 11:45
Four Level Framework for Prompt Engineering
@MihailCosmin
MihailCosmin / cuda_11.8_installation_on_Ubuntu_22.04
Last active January 6, 2025 11:45 — forked from primus852/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.8 and cuDNN 8.7 installation on Ubuntu 22.04 for PyTorch 2.0.0
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@teocci
teocci / how-to-ssh-into-windows.md
Created October 13, 2022 08:07
How to SSH into Windows 10 or 11?

How to SSH into Windows 10 or 11?

The latest builds of Windows 10 and Windows 11 include a build-in SSH server and client that are based on OpenSSH. This means now you can remotely connect to Windows 10/11 or Windows Server 2019 using any SSH client, like Linux distros. Let's see how to configure OpenSSH on Windows 10 and Windows 11, and connect to it using Putty or any other SSH client.

OpenSSH is an open-source, cross-platform version of Secure Shell (SSH) that is used by Linux users for a long time. This project is currently ported to Windows and can be used as an SSH server on almost any version of Windows. In the latest versions of Windows Server 2022/2019 and Windows 11, OpenSSH is built-in to the operating system image.

@wasulabenjamin
wasulabenjamin / How to activate Sublime Text Build 4180 x64.md
Last active January 6, 2025 11:43
How to activate Sublime Text Build 4189 x64.md

Activate Sublime Text Build 4189 x64

  1. Go to https://hexed.it/
  2. Click Open File in the top left corner, navigate to instalation folder and select sublime_text.exe
  3. Press CTRL + F or on the Search for bar in the left panel and look for: 80 79 05 00 0F 94 C2
  4. Now in the editor, click on the first byte (80) and start replacing each byte by: C6 41 05 01 B2 00 90
  5. Finally, in the top left corner again, click on Save as and replace the old executable file with the newly created one.

Enjoy an Unlimited User License!

@kvba5
kvba5 / guns-uploader.user.js
Created January 6, 2025 11:41
Adds 2 new upload buttons to Image Host page
// ==UserScript==
// @name Guns.lol Uploader
// @namespace kvba5.guns-uploader
// @version 2025-01-06
// @description Allows you to upload images directly from the site
// @author kvba5
// @match https://guns.lol/imagehost
// @icon https://www.google.com/s2/favicons?sz=64&domain=guns.lol
// @grant unsafeWindow
// @run-at document-start
@Nadrieril
Nadrieril / shell.nix
Last active January 6, 2025 11:35
Building LineageOS on NixOS
# I used this shell.nix to build LineageOS 13.0 for my maguro (Samsung Galaxy Nexus GSM) phone
# The build instructions for normal Linuxes are here: https://wiki.lineageos.org/devices/maguro/build
# For NixOS, follow those instructions but skip anything related to installing packages
# Detailed instructions:
# cd into an empty directory of your choice
# copy this file there
# in nix-shell:
# $ repo init -u https://github.com/LineageOS/android.git -b cm-13.0
# $ repo sync
# $ source build/envsetup.sh
@RubenKelevra
RubenKelevra / fast_firefox.md
Last active January 6, 2025 11:34
Make Firefox fast again
@FreddieOliveira
FreddieOliveira / docker.md
Last active January 6, 2025 11:34
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@stephenturner
stephenturner / get-human-gene-info.R
Created December 30, 2024 14:36
Get information about human genes from RefSeq
library(tidyverse)
# Get Gene Summary info
gs_orig <- read_tsv("https://ftp.ncbi.nlm.nih.gov/gene/DATA/gene_summary.gz")
gs <- gs_orig |>
janitor::clean_names() |>
set_names(str_replace, "number_tax_id", "tax_id") |>
filter(tax_id==9606) |>
distinct()
gs
public class SoftInputAssist {
private View rootView;
private ViewGroup contentContainer;
private ViewTreeObserver viewTreeObserver;
private ViewTreeObserver.OnGlobalLayoutListener listener = () -> possiblyResizeChildOfContent();
private Rect contentAreaOfWindowBounds = new Rect();
private FrameLayout.LayoutParams rootViewLayout;
private int usableHeightPrevious = 0;
public SoftInputAssist(Activity activity) {