Skip to content

Instantly share code, notes, and snippets.

@francois-rozet
francois-rozet / flow_matching.py
Last active May 8, 2024 04:57
Flow Matching in 100 LOC
#!/usr/bin/env python
import math
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
from sklearn.datasets import make_moons
from torch import Tensor
from tqdm import tqdm
@NickMcSweeney
NickMcSweeney / postgresql_plus_arch-linux.md
Last active May 8, 2024 04:57
Getting postgresql running on Arch Linux

Setup Postgresql

run postgresql with systemctl

Install postgres

latest

sudo pacman -S postgresql

specific version

find version & build from source

@fevangelou
fevangelou / my.cnf
Last active May 8, 2024 04:56
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@Joeao
Joeao / index.ts
Last active May 8, 2024 04:53
Supabase Edge Functions - Resize, Tinify & Upload Image
import { serve } from "https://deno.land/std@0.168.0/http/server.ts";
import { crypto } from "https://deno.land/std@0.201.0/crypto/mod.ts";
import {
ImageMagick,
initialize,
MagickFormat,
} from "https://deno.land/x/imagemagick_deno@0.0.25/mod.ts";
import { Tinify } from "https://deno.land/x/tinify@v1.0.0/mod.ts";
import { createClient } from "https://esm.sh/@supabase/supabase-js@2.33.2";
@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 04:51
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

@yura
yura / pdf2jpg.sh
Created November 10, 2010 15:18
script to PDF to JPG using pdftk and imagemagick
#!/bin/bash
# Script to convert PDF file to JPG images
#
# Dependencies:
# * pdftk
# * imagemagick
PDF=$1