Skip to content

Instantly share code, notes, and snippets.

@adammyhre
adammyhre / Closure.cs
Created December 22, 2024 08:44
Simple Closure Implementation for Unity C#
using System;
public struct Closure<TContext> {
Delegate del;
TContext context;
public Closure(Delegate del, TContext context = default) {
this.del = del;
this.context = context;
}
Linkedin = {
config: {
scrollDelay: 3000,
actionDelay: 5000,
nextPageDelay: 5000,
// set to -1 for no limit
maxRequests: -1,
totalRequestsSent: 0,
// set to false to skip adding note in invites
addNote: true,
@bagder
bagder / urlgen.pl
Last active December 25, 2024 16:08
perl script to generate URL variations for URL parser tests and benchmarks
#!/usr/bin/perl
# [scheme][divider][userinfo][hostname][port number][path][query][fragment]
my $num = $ARGV[0];
sub get_part
{
my ($part, $g) = @_;
my @a;
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active December 25, 2024 16:02
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@basyliq
basyliq / gohugo_bsky_comments.md
Last active December 25, 2024 16:01
Integrate Bluesky replies as your blog's comment section in gohugo.io framework

Layout: layouts/_default/single.html

<div id="comments-section" data-bsky-uri="{{ .Params.bsky }}"></div>
{{ $comments := resources.Get "js/comments.js" }}
<script src="{{ $comments.RelPermalink }}"></script>
@h3r2tic
h3r2tic / raymarch.hlsl
Last active December 25, 2024 15:55
Depth buffer raymarching for contact shadows, SSGI, SSR, etc.
// Copyright (c) 2023 Tomasz Stachowiak
//
// This contribution is dual licensed under EITHER OF
//
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0)
// MIT license (http://opensource.org/licenses/MIT)
//
// at your option.
#include "/inc/frame_constants.hlsl"

For downloads and more information about VSeeFace, please check out the website.

Version 1.13.38c2:

  • Blacklisted 3tene virtual camera to avoid freezing at startup.

Version 1.13.38c:

  • Blacklisted virtual cameras that might cause issues when installed at certain versions from the camera selection menu. This should solve the NVIDIA driver issue in most cases.
  • Applied another fix to the virtual camera driver for better compatibility.
  • Separated out wrist bone reception from arm and shoulder reception for the VMC protocol receiver settings to allow better Mocopi with Leap Motion support.
  • No longer set realtime priority along with GPU background priority.
@MariaSolOs
MariaSolOs / builtin-compl.lua
Last active December 25, 2024 15:53
Built-in completion + snippet Neovim setup
---Utility for keymap creation.
---@param lhs string
---@param rhs string|function
---@param opts string|table
---@param mode? string|string[]
local function keymap(lhs, rhs, opts, mode)
opts = type(opts) == 'string' and { desc = opts }
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr })
mode = mode or 'n'
vim.keymap.set(mode, lhs, rhs, opts)
@baymaxium
baymaxium / content.md
Created October 18, 2017 09:17
蒋勇 | 白话区块链技术栈与应用

原文:中生代技术

(中生代技术&华章科技区块链技术分享第一期)

(本文约12000字,阅读完本文预计10分钟)

@gcollic
gcollic / git_for_intellij.sh
Last active December 25, 2024 15:49
Replace the path to git by the path of this file in order to stop IntelliJ from messing with your staging area (no config for rename & co).
#!/bin/bash
inner() {
local cmd="$@"
local REGEX="(^|log.showSignature=false )(add|rm|mv) "
if [[ $cmd =~ $REGEX ]]; then
echo 'Stopping IntelliJ from being a not well-behaved git client. See IDEA-194592, IDEA-63391, IDEA-176961, ...' >&2
return 1
fi
git "$@"
}