Skip to content

Instantly share code, notes, and snippets.

@Hengjie
Hengjie / tutorial.md
Last active May 1, 2024 02:33
How to passthrough SATA drives directly on VMWare ESXI 6.5 as RDMs

How to passthrough SATA drives directly on VMWare EXSI 6.5 as RDMs

There aren't many tutorials about this, the only tutorials I've found were about passing through entire PCIe cards to VMs, or refered to old ESXI versions (below 6.5) that used a more comprehensive desktop client instead of the web app. In v6.5, the web app was introduced and the desktop client was deprecated. You used to be able to setup RDMs in the desktop client, but with the introduction of the web console, this is no longer the case. This tutorial shows you how to pass SATA HDDs to the virtual machine on VMWare ESXI 6.5. This tutorial is partially based on VMWare's own KB and the now deprecated Forza IT blog post.

A word about VMWare ESXI 6.7

There is now an option while editing your VM's settings to add a New raw disk when you click `Add ha

@mdonahoe-dci
mdonahoe-dci / analytic_wfm.py
Created May 1, 2024 02:29 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See
<?php
define('BOT_TOKEN', '7041512989:AAFYTQ-CI0Umr1SF2IdU2Yqzbc3McXbHu4g'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@sunnminki
sunnminki / Index.html
Last active May 1, 2024 02:26
Projeto alura - Cronômetro
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Meus objetivos do ano</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<section class="conteudo-principal">
@tarnacious
tarnacious / build-qcow2.nix
Last active May 1, 2024 02:21
Build a bare bones bootable nixos qcow2 image suitable for running with libvirt/qemu/kvm.
{ config, lib, pkgs, ... }:
with lib;
{
imports =
[
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
./machine-config.nix
];
@K40N
K40N / webstatus.py
Created May 1, 2024 02:16
Web Status Script
from flask import Flask
from subprocess import check_output
app = Flask(__name__)
@app.route('/')
def root():
nf = '<pre>' + check_output('neofetch --stdout', shell=True).decode('utf-8') + '</pre>'
lsblk = '<pre>' + check_output('lsblk').decode('utf-8') + '</pre>'
return f'<h1>Server is running!</h1><br>\n{nf}\n<br>\n{lsblk}'
@psifertex
psifertex / binexport_binja.zsh
Last active May 1, 2024 02:13
BinExport build script for Binary Ninja (macOS + Linux Only)
#!/usr/bin/env zsh
# Note:
# CMake, Clang, clang-format, Ninja, git and sed are required to build
#
# Note that currently there is a bug (https://github.com/google/binexport/issues/117)
# that requires applying this patch, remove when resolved
#
if [ -d ~/Downloads ]
@Owaiskhan9654
Owaiskhan9654 / main.py
Created August 31, 2023 19:37 — forked from jvelezmagic/main.py
Langchain FastAPI stream with simple memory
# The goal of this file is to provide a FastAPI application for handling
# chat requests amd generation AI-powered responses using conversation chains.
# The application uses the LangChaing library, which includes a chatOpenAI model
# for natural language processing.
# The `StreamingConversationChain` class is responsible for creating and storing
# conversation memories and generating responses. It utilizes the `ChatOpenAI` model
# and a callback handler to stream responses as they're generated.
# The application defines a `ChatRequest` model for handling chat requests,
@meigwilym
meigwilym / CQRS.md
Last active May 1, 2024 02:10
CQRS, Task Based UIs, Event Sourcing agh!

CQRS, Task Based UIs, Event Sourcing agh!

Posted by gregyoung on February 16, 2010

Many people have been getting confused over what CQRS is. They look at CQRS as being an architecture; it is not. CQRS is a very simple pattern that enables many opportunities for architecture that may otherwise not exist. CQRS is not eventual consistency, it is not eventing, it is not messaging, it is not having separated models for reading and writing, nor is it using event sourcing. I want to take a few paragraphs to describe first exactly what CQRS is and then how it relates to other patterns.

CQRS Command and Query Responsibility Segregation

Starting with CQRS, CQRS is simply the creation of two objects where there was previously only one. The separation occurs based upon whether the methods are a command or a query (the same definition that is used by Meyer in Command and Query Separation, a command is any method that mutates state and a query is any method that returns a value).

@chuyqa
chuyqa / PG_Rag_Benchmarks.ipynb
Last active May 1, 2024 02:07
PGVector Local LLM
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.