Skip to content

Instantly share code, notes, and snippets.

@sunmeat
sunmeat / DML.txt
Created January 13, 2025 11:27
однотабличні запити DML
1. Порахувати можливий дохід за хліб та молоко (з урахуванням знижок на ці товари)
2. Отримати інформацію про товари, які були доставлені вчора і сьогодні більше 10 одиниць (getdate, dateadd)
3. Показати назви та ціни товарів, доставлених протягом останнього місяця
4. Показати на екран назви та ціни товарів з категорії "Кондитерські вироби", але тільки не торгової марки "Roshen"
5. Показати на екран усі товари, назви яких починаються на букву "К", а категорії містять букву "А"
@Makeshift
Makeshift / tutorial.md
Last active January 13, 2025 11:27
Tutorial for automatically syncing an Obsidian vault with Git on an Android device

How to sync Obsidian with Git on Android

Limitations

  • If Termux is closed in the background by Android, the cron service will stop updating your repository and you must open Termux again. Refer to instructions for your device model to disable the killing of certain background applications.
  • This may negatively affect your devices battery life. I'm not entirely sure yet.

Setup

@sam0737
sam0737 / clock.html
Last active January 13, 2025 11:26
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >
You are tasked with analyzing a merged PDF containing multiple documents in German and creating a bash script to split and rename these documents. Follow these instructions carefully:
First, carefully examine the content of the merged PDF.
Now, follow these steps:
1. Analyze the PDF:
- Identify all distinct documents within the merged PDF.
- Ignore any blank pages (pages that contain no letters).
- Determine the page range for each document.
const Stations = [
{
id: "1",
name: "إذاعة صور من حياة الصحابة رضوان الله عليهم",
radio_url: "https://qurango.net/radio/sahabah",
name_en: "Sahaba Stories",
category: "منوعات",
category_en: "Others"
},
{
@EgorBo
EgorBo / Dynamic PGO in .NET 6.0.md
Last active January 13, 2025 11:13
Dynamic PGO in .NET 6.0.md

Dynamic PGO in .NET 6.0

Dynamic PGO (Profile-guided optimization) is a JIT-compiler optimization technique that allows JIT to collect additional information about surroundings (aka profile) in tier0 codegen in order to rely on it later during promotion from tier0 to tier1 for hot methods to make them even more efficient.

What exactly PGO can optimize for us?

  1. Profile-driving inlining - inliner relies on PGO data and can be very aggressive for hot paths and care less about cold ones, see dotnet/runtime#52708 and dotnet/runtime#55478. A good example where it has visible effects is this StringBuilder benchmark:

  2. Guarded devirtualization - most monomorphic virtual/interface calls can be devirtualized using PGO data, e.g.:

void DisposeMe(IDisposable d)
@disler
disler / README.md
Last active January 13, 2025 11:13
Use Meta Prompting to rapidly generate results in the GenAI Age

Meta Prompting

In the Generative AI Age your ability to generate prompts is your ability to generate results.

Guide

Claude 3.5 Sonnet and o1 series models are recommended for meta prompting.

Replace {{user-input}} with your own input to generate prompts.

Use mp_*.txt as example user-inputs to see how to generate high quality prompts.

@davidandreoletti
davidandreoletti / linux-vms-on-apple-m1-with-networking.md
Created September 16, 2023 14:30 — forked from max-i-mil/linux-vms-on-apple-m1-with-networking.md
Short summary to run Linux VMs on an Apple M1 host using QEMU, libvirt and HVF with a working network setup

Linux Virtual Machines with Private Network on an Apple M1 Device

Background

The aim was to be able to:

  1. Run multiple Linux VMs on an Apple M1/ARM device
  2. Use Apple's HVF for native performance speeds
  3. Configure VMs to allow network access to each other
  4. Configure VMs to allow access to the internet
  5. Not rely on custom modifications of software
@davidteren
davidteren / nerd_fonts.md
Last active January 13, 2025 11:03
Install Nerd Fonts via Homebrew [updated & fixed]
@vdutor
vdutor / tensorboard_to_gif.py
Created September 17, 2019 14:52
Convert images in tensorboard file to GIF
import argparse
import os
import shutil
import imageio
import matplotlib.pyplot as _
import matplotlib as mpl
import numpy as np
import tensorflow as tf