Skip to content

Instantly share code, notes, and snippets.

@saper-2
saper-2 / README.md
Created January 5, 2024 17:59
Debian on HP T620 terminal - hints

Installation tips

I use only Debian and net-inst image to install linux, and I use text install 😄

  • When partitioning primary disk where will be Debian installed, create first partiton of size 256-512M as EFI System partition - this will set this partition as Bootable, and FileSystem=vfat .
  • Don't forget about swap partition if you have not much too much RAM (at least of size of RAM), I usually create 4-8GB as 2nd partition on disk.
  • You can optionally create partition for /boot that have about 1-2GB , FS=ext4,
  • Or just use whole disk as / , FileSystem=ext4 - I almost always choose this setup - it's the most optimal.
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 6, 2024 12:02
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shankypedia
shankypedia / obtain_completed_quest_badge.rst
Created May 6, 2024 11:21
Guide to obtain the "Completed a Quest" Discord badge

Obtaining the Discord Badge

This guide provides instructions on obtaining the "Completed a Quest" Discord badge using two methods: Vencord or a manual method by updating Discord's settings. Please note that Discord is currently attempting to fix this process, and it may not always work as expected.

Note:

  • This method does not work on a web browser.
  • There must be a user in the voice channel watching your stream.
import asyncpg
import dlt
import asyncio
from typing import Any, Dict, Optional
from dlt.common.schema.typing import TColumnSchema
"""Convert an asyncpg type to a dlt column schema type.
This maps asyncpg types to dlt types based on PostgreSQL to Python type mapping
provided by asyncpg and the dlt data types.
@Iftimie
Iftimie / index.css
Last active May 6, 2024 12:00
Resume
/* Fonts */
/* Family */
h1 {
font-family: 'Julius Sans One', sans-serif;
}
h2 { /* Contact, Skills, Education, About me, Work Experience */
font-family: 'Archivo Narrow', sans-serif;
}
@lu4nm3
lu4nm3 / main.rs
Last active May 6, 2024 12:00
Tokio Async: Concurrent vs Parallel
use futures::StreamExt;
use std::error::Error;
use tokio;
use tokio::macros::support::Pin;
use tokio::prelude::*;
use tokio::time::{Duration, Instant};
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut multi_threaded_runtime = tokio::runtime::Builder::new()
.threaded_scheduler()
/* UTILS AND CONSTANTS*/
const SPEED_MULTIPLIER = 1.852;
const DISTANCE_MULTIPLIER = 111.045;
const SETTINGS = {
"default_object_online_timeout": 5
,"valid_by_avg_speed": false
,"min_moving_speed": 6
,"addon.device_tracker_app_login": false
@jforge
jforge / reset-pi-passwd.md
Created May 6, 2024 11:58 — forked from jlollis/reset-pi-passwd.md
Reset Forgotten Raspberry Password

Reset Forgotten Raspberry Pi Password

Remove SD Card

The first step is to turn off the Raspberry so you can remove the memory card without worry.

If the Raspberry Pi is not connected to a screen, the only way to turn it off is to unplug it. Otherwise, you can go through the GUI to turn it off properly, via the menu, before unplugging it.

Once the Raspberry Pi is turned off, you can insert the card into your computer and go to the next step.

@tuansoibk
tuansoibk / cryptography-file-formats.md
Last active May 6, 2024 11:56
Cryptography material conversion and verification commands
  1. Introduction
  2. Standards
  3. Common combinations
  4. Conversion
  5. Verification/Inspection
  6. Tips for recognising

Introduction

It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.

@iambryancs
iambryancs / get-argocd-default-password.md
Created October 3, 2023 03:05
Get ArgoCD default admin password

Get ArgoCD default admin password

To get ArgoCD default admin password after installation, run:

kubectl -n argocd get secret argocd-initial-admin-secret \
          -o jsonpath="{.data.password}" | base64 -d; echo

The default admin user is admin.