Skip to content

Instantly share code, notes, and snippets.

@mstevenson
mstevenson / Fps.cs
Last active December 22, 2025 05:19
An accurate FPS counter for Unity. Works in builds.
using UnityEngine;
using System.Collections;
public class Fps : MonoBehaviour
{
private float count;
private IEnumerator Start()
{
GUI.depth = 2;
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active December 22, 2025 05:18
Hyperlinks in Terminal Emulators
@Changaco
Changaco / btrfs-undelete
Last active December 22, 2025 05:18
btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <[email protected]>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo
@adammyhre
adammyhre / CrowdInstance.shader
Created December 21, 2025 12:25
Compute Shader Example
Shader "Crowd/InstancedAgent" {
SubShader {
Tags { "RenderPipeline"="UniversalRenderPipeline" "RenderType"="Opaque" }
Pass {
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
@MarvNC
MarvNC / get-discord-token-from-browser.md
Last active December 22, 2025 04:57
How to Get Your Discord Token From the Browser Developer Console

How to Get Your Discord Token From the Browser Console

New method (contributed by youyoumu)

  • Open the browser console with F12 or Ctrl + Shift + I.
  • Enable mobile device emulation with Ctrl + Shift + M.
  • Paste the following code into the console and press Enter:
const iframe = document.createElement('iframe');
@tamboer
tamboer / git_clean.txt
Created June 24, 2013 10:10
git clean
git clean -f
If you want to also remove directories, run git clean -f -d.
If you just want to remove ignored files, run git clean -f -X.
If you want to remove ignored as well as non-ignored files, run git clean -f -x.
Note the case difference on the X for the two latter commands.
@steven2358
steven2358 / ffmpeg.md
Last active December 22, 2025 04:56
FFmpeg cheat sheet
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active December 22, 2025 04:55
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 22, 2025 05:06
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter: