Skip to content

Instantly share code, notes, and snippets.

@PixelEnvision
PixelEnvision / CinemachineGroundChecker.cs
Created February 7, 2023 12:04
A Cinemachine Extension to keep the camera above ground.
using UnityEngine;
using Cinemachine;
[AddComponentMenu("")] // Hide in menu
[SaveDuringPlay]
#if UNITY_2018_3_OR_NEWER
[ExecuteAlways]
#else
[ExecuteInEditMode]
#endif
@fastfingertips
fastfingertips / block-gists-from-users.md
Last active January 20, 2025 20:24
Block GitHub Gists from Specific Users

Block GitHub Gists from Specific Users using uBlock Origin

If you want to block Gists from certain users on GitHub, you can use custom filter rules for uBlock Origin. This method will hide Gist snippets created by the specified users from appearing on the GitHub website, including on the discover page (https://gist.github.com/discover).

How to Use

  1. Install the uBlock Origin browser extension if you haven’t already.
  2. Open uBlock Origin settings.
  3. Go to the My Filters tab.
  4. Add the following filter rules:
@sjvnnings
sjvnnings / menu_cursor.gd
Created September 5, 2021 22:42
A Simple JRPG-style cursor script in Godot. To use, just set the menu_parent_path property in the editor to the container your menu options are stored in.
extends TextureRect
export var menu_parent_path : NodePath
export var cursor_offset : Vector2
onready var menu_parent := get_node(menu_parent_path)
var cursor_index : int = 0
func _process(delta):

PWM fan control in Linux with a Gigabyte Aorus motherboard

  • install lm-sensors with your package manager

sensors

If it won't show any fan/speed, continue

sensor-detect

@rxaviers
rxaviers / gist:7360908
Last active January 20, 2025 20:18
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@pianosnake
pianosnake / bounding-box-from-lat-lng-zoom-img-size.js
Last active January 20, 2025 20:18
Get a bounding box from latitude, longitude, zoom level and image size. Useful for getting the bounding box of a static map generated with only those variables.
const EARTH_CIR_METERS = 40075016.686;
const degreesPerMeter = 360 / EARTH_CIR_METERS;
function toRadians(degrees) {
return degrees * Math.PI / 180;
};
function latLngToBounds(lat, lng, zoom, width, height){
const metersPerPixelEW = EARTH_CIR_METERS / Math.pow(2, zoom + 8);
const metersPerPixelNS = EARTH_CIR_METERS / Math.pow(2, zoom + 8) * Math.cos(toRadians(lat));

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@rutcreate
rutcreate / README.md
Last active January 20, 2025 20:17
Install Python 3.10.x on Ubuntu 20.04

Prerequisite

sudo apt update
sudo apt install software-properties-common -y

Add custom APT repository