Skip to content

Instantly share code, notes, and snippets.

@verazuo
verazuo / cuda_11.7_installation_on_Ubuntu_20.04
Last active April 30, 2024 11:25 — forked from X-TRON404/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.7 and cuDNN 8.5 installation on Ubuntu 20.04 for PyTorch 1.12.1
#!/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
@tbaddade
tbaddade / a11y-list.md
Last active April 30, 2024 11:25
Sammlung für Barrierefreiheit
@dhruvhcinterior
dhruvhcinterior / gist:da72fb5f3081760faed7335ac5fac772
Created April 30, 2024 11:13
Expert interior designers in Delhi / Home Renovation Services In Delhi NCR
Expert interior designers in Delhi / Home Renovation Services In Delhi NCR
@TheAndrey
TheAndrey / yandex.user.css
Last active April 30, 2024 11:22
Блокировка самой назойливой рекламы в мире
/* ==UserStyle==
@name Yandex ADBlock
@namespace TheAndrey
@version 1.1.8
@license WTFPL
@preprocessor default
@updateURL https://gist.github.com/TheAndrey/11eacc8ea931f33e846ec8edeb4b247a/raw/yandex.user.css
==/UserStyle== */
@-moz-document domain("yandex.ru"), domain("ya.ru"), domain("dzen.ru") {
@alissa-maria
alissa-maria / daily-text.py
Created April 9, 2024 10:09
Prints daily text + explanation to stdout
import requests
from bs4 import BeautifulSoup
url = 'https://wol.jw.org/en/wol/h/r1/lp-e'
response = requests.get(url)
html_content = response.content
soup = BeautifulSoup(html_content, 'html.parser')
@camsaul
camsaul / hello_world.asm
Last active April 30, 2024 11:16
Hello World in NES (6502 / NESASM) Assembly. Display a single sprite
;;; -*- tab-width: 2 -*-
;;; These four lines go at the beginning of almost every code file. 16-byte iNES header
.inesprg 1 ; one bank of program code
.ineschr 1 ; one bank of picture data
.inesmap 0 ; we use mapper 0
.inesmir 1 ; Mirror setting always 1
;;; BANKING
@jgrodziski
jgrodziski / docker-aliases.sh
Last active April 30, 2024 11:15
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
@Kartones
Kartones / postgres-cheatsheet.md
Last active April 30, 2024 11:15
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
import { zodResolver } from "@hookform/resolvers/zod";
import * as z from "zod";
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form'; //shadcn ui folder
const MAX_FILE_SIZE = 1024 * 1024 * 5;
const ACCEPTED_IMAGE_MIME_TYPES = [
"image/jpeg",
"image/jpg",
"image/png",
"image/webp",
];