Skip to content

Instantly share code, notes, and snippets.

@dreikanter
dreikanter / Interpolator.cs
Last active May 3, 2024 22:25
Spline interpolation in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace Interpolation
{
/// <summary>
/// Spline interpolation class.
@StagPoint
StagPoint / QuaternionCompression.cs
Last active May 3, 2024 22:23
C# - Use "smallest three" compression for transmitting Quaternion rotations in Unity's UNET networking, from 16 bytes to 7 bytes.
// Copyright (c) 2016 StagPoint Software
namespace StagPoint.Networking
{
using System;
using UnityEngine;
using UnityEngine.Networking;
/// <summary>
/// Provides some commonly-used functions for transferring compressed data over the network using
import torch
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
# This layer is dropped into your pre-trained PyTorch model where nn.Linear is used
class DoRALayer(nn.Module):
def __init__(self, d_in, d_out, rank=4):
super().__init__()
@OrionReed
OrionReed / dom3d.js
Last active May 3, 2024 22:21
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@shr00mie
shr00mie / bind9_slave.sh
Last active May 3, 2024 22:17
BIND9 slave for AD DNS master
#!/bin/bash
#
## -------------------------------=[ Info ]=--------------------------------- ##
#
# Inspired by and adapted from:
# /u/rootwyrm
# https://www.reddit.com/r/homelab/comments/3zqg2y/using_bind_linux_as_a_backup_dns_server_to_a/
#
# Successfully tested on:
# - ESXi 6.7 -> Ubuntu Server 18.04
@BigOokie
BigOokie / MacOS-Multi-Version-Go-With-Homebrew.md
Last active May 3, 2024 22:13
Manage multiple versins of Go on MacOS with Homebrew

This process would likely apply to other Homebrew formula also.

First search for your desired package:

brew search go

You should get a list of results that include the below. Not "go" is very unspecific so you may get a lot of results:

@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active May 3, 2024 22:12
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@TRB-Exe
TRB-Exe / windowsfastactivation.md
Last active May 3, 2024 22:11
Windows 10 fast activation from cmd

Super easy and fast activation from command prompt

Run cmd.exe with Admin permissions and enter commands for your system

windows 10/11

slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
slmgr /skms kms.digiboy.ir
slmgr /ato
@kvnxiao
kvnxiao / awesome-selfhosted-sorted-by-stars.md
Last active May 3, 2024 22:11
awesome-selfhosted-sorted-by-stars.md

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

@straker
straker / README.md
Last active May 3, 2024 22:08
Basic Doodle Jump HTML and JavaScript Game

Basic Doodle Jump HTML and JavaScript Game

This is a basic implementation of the game Doodle Jump, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Platforms Types
  • There are 4 different types of platforms: Normal, Broken, Moving, and Disappearing