Skip to content

Instantly share code, notes, and snippets.

@Andrei15193
Andrei15193 / Pawn.cs
Last active August 6, 2023 00:37
sbox / Detect Touch Events for ModelEntity
public partial class Pawn : AnimatedEntity
{
public override void Spawn()
{
SetModel( "models/citizen/citizen.vmdl" );
SetupPhysicsFromModel( PhysicsMotionType.Keyframed );
// Or anything else.
// If an entity has no tags then it will default to collide.
Tags.Add( "player" );
}

Taken from this YouTube video by Aar

The settings:

fov_desired 90
viewmodel_fov 70
tf_use_min_viewmodels 1
cl_interp 0.0325
cl_interp_ratio 1
@webcrawls
webcrawls / local.ts
Last active June 19, 2023 20:18
A Svelte store backed by the browser's localStorage. Supports custom serializer and deserializer functions.
export const localStore = <T = any>(key: string,
value: T,
deserializer: (value: string) => T = JSON.parse,
serializer: (value: T) => string = JSON.stringify): Writable<T> => {
const {subscribe, set: initialSet, update: initialUpdate} = writable<T>()
const loadValue = (): string | null => browser ? localStorage.getItem(key) : null
const saveValue = (value: string) => browser && localStorage.setItem(key, value)
const initialValue = loadValue()
@webcrawls
webcrawls / README.md
Created August 26, 2020 03:37
Basic commands to manage a Minecraft server running on Ubuntu 18.04

Introduction

This guide assumes you are using Ubuntu 18.04 Server, you have screen installed, and that your server is already uploaded to the server.

This guide also assumes you have a server start script. You can find one here

Tools

Screen

@xavierfoucrier
xavierfoucrier / gpg-signing.md
Last active June 21, 2024 13:14
GPG signing with Git and Github Desktop

GPG signing – git github-desktop

Here is a short guide that will help you setup your environment to create signed commits or signed tags with Git locally. This has been extensively tested on Windows with Git and the Github Desktop application: I use it every day for my professional development projects.

I you face any issue, feel free to leave a comment below.

Summary

  1. Sign commits or tags
  2. Key passphrase
  3. Disable signatures
  4. Renew a GPG key