Skip to content

Instantly share code, notes, and snippets.

@mmozeiko
mmozeiko / preview.c
Last active May 5, 2024 23:40
windows shell preview handler example
// example of using Windows Preview Handler
// https://learn.microsoft.com/en-us/windows/win32/shell/preview-handlers
#define COBJMACROS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shlwapi.h>
#include <shellapi.h>
#include <shobjidl.h>
@AustinRochford
AustinRochford / revisit_bayes_survival.ipynb
Last active May 5, 2024 23:36
Revisiting Bayesian Survival Analysis in Python with PyMC
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hqnicolas
hqnicolas / .Stable Diffusion RX7800XT AMD ROCm with Docker-compose
Last active May 5, 2024 23:34
Stable Diffusion v1.7.0 on RX7800XT AMD ROCm with Docker-compose
#tutorial for Stable diffusion v1.7.0 or older
# Install UBuntu 22.04
# Based on https://phazertech.com/tutorials/rocm.html
# Follow phazertech on Youtube https://phazertech.com/youtube.html
# Download CasaOs.io https://casaos.io/
# AMD Drivers & ROCm on Ubuntu
# Here are the new official instructions for installing the AMD drivers using the package manager.
# The necessary steps have been copied here for your convenience.
# First download and convert the package signing key:
#
@AustinRochford
AustinRochford / Bayesian Survival Analysis.ipynb
Last active May 5, 2024 23:32
Bayesian Survival Analysis PyMC3 Tutorial
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rikka0w0
rikka0w0 / pxe_win10_winpe.md
Last active May 5, 2024 23:31
Boot Windows 10 and WinPE from PXE (IPXE)

Pre-requests:

  1. TFTP server
  2. IPXE Make sure ipxe.lkrn is in the TFTP root.
  3. iSCSI target (Server) Assume we have an iSCSI target "1:net.cszombie.au:windows" that is ready to be connected. 1 is LUN id, "net.cszombie.au:windows" is the target name.
  4. HTTP server (To speed up loading boot.wim, http is faster than tftp, http is supported by IPXE, however this is optional)

1. Download wimboot to the root of the TFTP server

2. Create scripts:

@cmendible
cmendible / kubectl_ubuntu_wsl.sh
Created November 16, 2019 22:02
Install kubectl on ubuntu (WSL) and use kubectl config from Windows
#!/bin/bash
# Receives your Windows username as only parameter.
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
windowsUser=$1
@RiadHossain43
RiadHossain43 / multi-tenancy.md
Last active May 5, 2024 23:25
Node JS, MongoDB Multi Tenancy Approach

Stroy

Imagine you are building a simple project management application that has follwing simple features

  • Manage projects (your organisation may have multiple projects running)
  • Manage work packages related to a project
  • Manage members in your organisation that may need to have access to projects in your organisation.

Shared database approach

@RobinLinus
RobinLinus / zkCoins.md
Last active May 5, 2024 23:23
zkCoins: A payment system with strong privacy and scalability, combining a client-side validation protocol with validity proofs

zkCoins

zkCoins is a novel blockchain design with strong privacy and scalability properties. It combines client-side validation with a zero-knowledge proof system. The chain is reduced to a minimum base layer to prevent double spending. Most of the verification complexity is moved off-chain and communicated directly between the individual sender and recipient of a transaction. There are very few global consensus rules, which makes block validation simple. Not even a global UTXO set is required.

In contrast to zk-rollups there is no data availability problem, and no sequencer is required to coordinate a global proof aggregation. The protocol can be implemented as an additional layer contained in Bitcoin's blockchain (similar to RGB[^5] or Taro[^6]) or as a standalone sidechain.

The throughput scales to hundreds of transactions per second without sacrificing decentralization.

Design Principles

The core design principle is to *"use the chain for what the chain is good for, which is an immutable order

@jordienr
jordienr / tailwind.config.ts
Created July 15, 2023 09:10
Tailwind SVG Grid Background
// Remember to install mini-svg-data-uri
// Follow me on twitter for memes @jordienr
import { type Config } from "tailwindcss";
const {
default: flattenColorPalette,
} = require("tailwindcss/lib/util/flattenColorPalette");
const svgToDataUri = require("mini-svg-data-uri");
export default {
@alekratz
alekratz / .aliases
Last active May 5, 2024 23:19
Pacman aliases
# pacman aliases
alias pac='pacman -S' # install
alias pacu='pacman -Syu' # update, add 'a' to the list of letters to update AUR packages if you use yaourt
alias pacr='pacman -Rs' # remove
alias pacs='pacman -Ss' # search
alias paci='pacman -Si' # info
alias paclo='pacman -Qdt' # list orphans
alias pacro='paclo && sudo pacman -Rns $(pacman -Qtdq)' # remove orphans
alias pacc='pacman -Scc' # clean cache
alias paclf='pacman -Ql' # list files