Skip to content

Instantly share code, notes, and snippets.

@davxy
davxy / ticket_check.rs
Last active January 24, 2025 13:24
Ticket Ring Proof Check
#[derive(CanonicalSerialize, CanonicalDeserialize)]
struct RingVrfSignature {
output: Output,
// This contains both the Pedersen proof and actual ring proof.
proof: RingProof,
}
fn check() {
use ark_ec_vrfs::ring::Verifier as _;
@jborean93
jborean93 / Appx-Server2025.ps1
Created November 10, 2024 21:40
Fix Appx in PSRemoting for Server 2025
# Server 2025 fails to run Get-AppxPackage and other DISM module commands in
# a PSRemoting (psrp) session as it has a dependency on some dll's not present
# in the GAC and only in the powershell.exe directory. As PSRP runs through
# wsmprovhost.exe, it fails to find those dlls. This hack will manually load
# the 4 required dlls into the GAC. This is a hack and should be removed in the
# future if MS fix their bug on 2025.
Add-Type -AssemblyName "System.EnterpriseServices"
$publish = [System.EnterpriseServices.Internal.Publish]::new()
@apurvmishra99
apurvmishra99 / sshDICE.md
Last active January 24, 2025 13:24
Setup for easy ssh experience with DICE machines in University of Edinburgh

SSH Config to access any DICE machines easily

Remote access to DICE machines is a bit painful, you first need to connect to a ssh gateway, enter your password and then do ssh student.login to have proper access. Also, directly accessing any of the DICE lab computers doesn't work. We can solve all these probelms by editing our ~/.ssh/config file and kerberos.

Using kerberos, will make sure you won't need to type your password more than once per day while working remotely. The instructions on how to set it up are here.

After you have set it up open up your ssh config file which is usually in ~/.ssh/config. Then add the following lines.

@benob
benob / bm25.py
Created March 20, 2022 11:33
Simple implementation of BM25 Okapi index in Python
from collections import defaultdict
from math import log
stopwords = {'le', 'la', 'du'}
documents = ['le chat boit du lait', 'le chien aime le chat', 'la souris aime le chien']
index = defaultdict(list)
doc_length = []
# Create the index
@sepastian
sepastian / nikon_d7000_hdmi.md
Last active January 24, 2025 13:21
Nikon D7000 full screen HDMI output

Purpose

Stream HDMI video from a Nikon D7000, for usage in online meetings, video recording, etc.

Based on this video on Youtube.

Steps

1) Download firmware

@CHSuworatrai
CHSuworatrai / VMware vSphere 6.x Licence Keys
Created April 8, 2021 09:20 — forked from DVSB/VMware vSphere 6.x Licence Keys
VMware vSphere 6 and 7 Licence Keys
VMware vSphere 6 Enterprise Plus
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
VMware vSphere with Operations Management 6 Enterprise
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52
@retrography
retrography / scheme.applescript
Last active January 24, 2025 13:15
Apply a color preset to the current iTerm session from command prompt
#!/usr/bin/osascript
-- Copyright © 2016, Mahmood Shafeie Zargar all rights reserved
-- This program is released under the terms of MIT License
-- Sort routine from http://www.macosxautomation.com/applescript/sbrt/sbrt-05.html
on run argv
try
set argument to item 1 of argv
on error
@ifeulner
ifeulner / 01_longhorn_bestpractices.md
Last active January 24, 2025 13:12
Longhorn hcloud best practices

Longhorn best practices

The following settings are provided as an example how longhorn should be configured in a production cluster, especially if it is deployed on Hetzner Cloud infrastructure.

Hetzner server nodes provide local storage and allow up to five attached volumes (with a size of up to 10TiB each) Local storage is provided by NVMe storage and therefore is much faster than the attached volumes, but limited in size (max 300GiB usable).

It is assumed that the cluster creation is already done, e.g. via terraform scripts provided by the great kube-hetzner project.

Initial configuration

@davidfowl
davidfowl / dotnetlayout.md
Last active January 24, 2025 13:09
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@pjcdawkins
pjcdawkins / .gitlab-ci.yml
Last active January 24, 2025 13:08
GitLab - Platform.sh CI scripts
stages:
- review
- cleanup
variables:
# The Platform.sh project ID.
PF_PROJECT_ID: abcdefg123456
push-platformsh:
# This Docker image installs the Platform.sh CLI (and PHP, Git and SSH).