Skip to content

Instantly share code, notes, and snippets.

Excalidraw

The Obsidian-Excalidraw plugin integrates Excalidraw, a feature rich sketching tool, into Obsidian. You can store and edit Excalidraw files in your vault, you can embed drawings into your documents, and you can link to documents and other drawings to/and from Excalidraw. For a showcase of Excalidraw features, please read my blog post here and/or watch the videos below.

Please upgrade to Obsidian v0.12.19 or higher to get the latest release.

@ourownstory
ourownstory / encrypted_dual_boot_xps_17.md
Last active June 1, 2025 21:35
Encrypted dual boot setup for Pop!_OS and Windows 10 using LUKS and Bitlocker on Dell XPS 17 9700

Encrypted dual boot setup with Pop!_OS and Windows 10

How to guide, using LUKS and Bitlocker on Dell XPS 17 9700

This guide is for those who want to use their XPS 17 in dual boot with their (preinstalled) Windows 10 and a new Pop!_OS installation, without giving up Bitlocker Encryption in Windows nor LUKS encryption in Linux.

The only guides that I could find were for Ubuntu, which it should be identical to, but I found the ommission of a few steps to resolve issues that I encountered in my first install attempt. Hoping to save you some trouble, I am sharing the steps that worked for me, linking the original guides that I found useful.

1. Preparation

  • 1.1 Of course: Backup all your data! You always do this when people tell you to, right? Maybe this time better be safe than sorry.
  • 1.2 Safely note your Bitlocker recovery key somewhere off your XPS. Where to find it
@nkhitrov
nkhitrov / logger.py
Last active August 29, 2025 00:11
Configure uvicorn logs with loguru for FastAPI
"""
WARNING: dont use loguru, use structlog
https://gist.github.com/nkhitrov/38adbb314f0d35371eba4ffb8f27078f
Configure handlers and formats for application loggers.
"""
import logging
import sys
from pprint import pformat
{
"logger": {
"path": "/var/logs",
"filename": "access.log",
"level": "info",
"rotation": "20 days",
"retention": "1 months",
"format": "<level>{level: <8}</level> <green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> request id: {extra[request_id]} - <cyan>{name}</cyan>:<cyan>{function}</cyan> - <level>{message}</level>"
}
# Custom Logger Using Loguru
import logging
import sys
from pathlib import Path
from loguru import logger
import json
class InterceptHandler(logging.Handler):
from fastapi import FastAPI
from fastapi import Request
import logging
logger = logging.getLogger(__name__)
def create_app() -> FastAPI:
app = FastAPI(title='CustomLogger', debug=False)
return app
from fastapi import FastAPI
from custom_logging import CustomizeLogger
from pathlib import Path
from fastapi import Request
import uvicorn
import logging
logger = logging.getLogger(__name__)
config_path=Path(__file__).with_name("logging_config.json")
@netsensei
netsensei / dell-xps-9380.md
Last active June 19, 2024 13:49
Installing Fedora 30/31 on Dell XPS 13 9380

Installing Fedora 30/31 on a Dell XPS 13 9380 series in dual boot mode

This guide describes how to install Fedora 30/31 next to Windows 10 on a Dell XPS 13 9380 series in dual boot.

  • Keep the stock Windows 10 installation that came with the laptop.
  • Install Fedora 30 alongside Windows on the hard disk.
  • Install GRUB as the bootloader allowing you to choose which OS to boot from.

Authored: September 2019

  • Based on https://gist.github.com/mdziekon/221bdb597cf32b46c50ffab96dbec08a
  • Installation date: 16-08-2019
  • Additional notes based on my own experience
  • EFI boot
  • Ubuntu 19.04 -> 21.04
  • This should work on any computer. Only the RAID > AHCI change described below and the device name for the nvme ssd drive are specific to this laptop.
  • The process describes a completely fresh installation with complete repartitioning, however it should work fine when Windows is already installed (eg. brand new machine with Windows preinstalled) as long as Windows already boots with EFI.
  • The process was conducted on Dell's XPS 15 9560 (2017) with specs:
  • CPU: i7-7700HQ
@GhostofGoes
GhostofGoes / .gitignore
Created October 4, 2018 04:29
Basic .gitignore template for Python projects
# Editors
.vscode/
.idea/
# Vagrant
.vagrant/
# Mac/OSX
.DS_Store