Skip to content

Instantly share code, notes, and snippets.

View Yalchin403's full-sized avatar
🏠
Working from home

Yalchin403 Yalchin403

🏠
Working from home
View GitHub Profile
@thevickypedia
thevickypedia / sphinx-pydantic.md
Last active May 7, 2024 20:38
Configure sphinx docs when using Pydantic

Sphinx Auto-docs and Pydantic Configuration

Sphinx autogen docs and pydantic don't get along.

Problem:

  • Using the BaseModel from pydantic takes the class members as arguments.
    • These arguments are displayed (along with the values) in the docs whether the user wants it or not.
@judaew
judaew / keychron_k2.adoc
Last active April 22, 2025 12:50
Keychron K2 Manual

Keychron K2 Manual

Connect Bluetooth

On the side of the keyboard, switch the toggle to Bluetooth. Press fn+1 3 seconds and pair with device named Keychron K2.

  • fn+1 connect to 1st device

  • fn+2 connect to 2nd device

  • fn+3 connect to 3rd device

@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active April 30, 2025 07:51
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@jegfish
jegfish / example_db.py
Last active September 5, 2024 09:01
Example code for connecting to and using a postgres database using discord.py and asyncpg.
# asyncpg docs: https://magicstack.github.io/asyncpg/current/
# This uses discord.py rewrite branch and .format(). If you are using the async branch of discord.py, it shouldn't matter much
# as only 'await ctx.send()' is something you should need to change. If you are using python 3.6+, you can use f strings as opposed to
# .format() for increased efficiency.
import discord
from discord.ext import commands
import asyncio
import asyncpg
@nolram
nolram / Dockerfile
Created August 13, 2017 01:35
Docker-compose: Django + Postgis + RabbitMQ + Celery + Redis
FROM python:3.5
MAINTAINER Marlon Baptista de Quadros([email protected])
ENV PYTHONUNBUFFERED 1
RUN apt-get update -y
RUN apt-get -y install binutils libproj-dev gdal-bin postgresql-client python3-lxml
RUN apt-get -y install libmemcached-dev
@musale
musale / remove.sh
Created June 20, 2017 14:46
Remove and re-install node on arch linux
sudo pacman -Rsc -n nodejs
sudo pacman -Sy nodejs
sudo pacman -Sy npm
@yufengwng
yufengwng / arch_cheatsheet.txt
Last active May 5, 2025 23:58
Arch Linux Commands Cheatsheet
pacman
======
view logs: /var/log/pacman.log
update system
# pacman -Syu
list installed packages
# pacman -Q