This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Here is a CSS-only technique to remove whitespace from between inline-block | |
elements. Note that any text nodes that are direct children of the | |
containing-element will need their font-size manually readjusted. | |
--> | |
<style type="text/css"> | |
.big-text { | |
font-size: 48px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import sublime_plugin | |
import subprocess | |
from time import sleep | |
import sys | |
cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip() | |
log = lambda message: sys.stderr.write("Log: %s\n" % message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// ================ Half.cs ==================== | |
/// The code is free to use for any reason without any restrictions. | |
/// Ladislav Lang (2009), Joannes Vermorel (2017) | |
using System; | |
using System.Diagnostics; | |
using System.Globalization; | |
namespace SystemHalf | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get TagTool from https://ci.appveyor.com/project/Beatthezombie/tagtool/builds/32275655/job/0nyje3212u82w3li/artifacts | |
Source is at https://github.com/TheGuardians/TagTool. | |
Extract the archive into the game's maps folder, then open TagTool.exe. | |
Current capabilities (TLDR): | |
Create, duplicate, rename tags. | |
Edit tag fields and tagblocks. | |
Import custom texture, model, sound, simple collisions tags. | |
Port content from Halo 3 and ODST 360 .map files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Loads a scene in the background using a seperate thread and a queue. | |
# Foreach new scene there will be an instance of ResourceInteractiveLoader | |
# that will raise an on_scene_loaded event once the scene has been loaded. | |
# Hooking the on_progress event will give you the current progress of any | |
# scene that is being processed in realtime. The loader also uses caching | |
# to avoid duplicate loading of scenes and it will prevent loading the | |
# same scene multiple times concurrently. | |
# | |
# Sample usage: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
///Returns a random object from the array with probabilities | |
///</summary> | |
/// <param name="prob">the probability of being chosen for each value in the array, their sum must be <= 1</param> | |
public static T ChooseWithProbabilities<T>(float[] prob,params T[] array) | |
{ | |
float rn = RNG.Randf(); | |
int len = array.Length; | |
float[][] intervals = new float[len][]; | |
if (len != prob.Length || len == 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This script bulk-renames many things in Godot 3 projects to hopefully | |
# make it easier to convert them to Godot 4. The goal is to do as much | |
# replacing as possible here so that the diffs Godot produces are smaller. | |
set -uo pipefail | |
IFS=$'\n\t' | |
# Loops through all text files tracked by Git. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tool | |
extends Control | |
@export var device: int = 0 | |
func _process(delta: float) -> void: | |
queue_redraw() | |
func _draw() -> void: | |
# Set the size, the layout isn't dynamic and based on something I sketched! |