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
# This is a prototype of the state recorder that can be used in a replay system | |
extends AnimationPlayer | |
var nodes = [] | |
var animations = {} | |
var properties = ["global_position", "global_rotation"] | |
func _init(): | |
set_name("state_recorder") |
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
/* Hides most graphical content by default unless you need to see it. | |
/* NOTE: can be used in Stylish as a theme */ | |
/* Hide some of the annoying background images (but not all...) */ | |
table div { | |
background-image: none !important; | |
} | |
/* Hide any element that has `src` attribute (images, youtube videos, thumbnails, etc) */ | |
/* May hide control elements like buttons, but they will be visible by an outline */ |
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
#!/bin/bash | |
# | |
# Build the latest MinGW toolchain | |
# | |
# WARNING: this is just a list of steps and not an actual script, some steps could work though... | |
# | |
# Download MXE | |
git clone https://github.com/mxe/mxe.git && cd mxe |
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
#!/bin/sh | |
# | |
# An example git hook which shows how to append an arbitrary bit of information to a commit. | |
# The following appends some version number to a commit message. | |
# | |
VERSION=$(command --version) # `command` is any executable | |
BUILD="Xrayez" # Some arbitrary name | |
# Ensure that version contains some build name |
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
-- Uses 0.25 step between shades of color, a total of 23 colors. | |
-- Assumes `color` to be already implemented as a callable table or a function. | |
local colors = { | |
color(1.0, 0.0, 0.0), | |
color(1.0, 0.25, 0.0), | |
color(1.0, 0.5, 0.0), | |
color(1.0, 0.75, 0.0), | |
color(0.75, 1.0, 0.0), | |
color(0.5, 1.0, 0.0), | |
color(0.25, 1.0, 0.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
get-pr() { | |
git fetch origin pull/"$1"/head:pr-"$1"; | |
git checkout pr-"$1"; | |
} |
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
git branch -m master newname | |
git push origin newname | |
# Change "Default Branch" in settings/options in GitHub | |
git push --delete origin master |
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 a list of absolute directory paths starting from current directory recursively. | |
Get-ChildItem -Recurse -Directory | Select Fullname |
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
# Ported from https://www.daniweb.com/programming/software-development/threads/321181/python-bresenham-circle-arc-algorithm | |
-- Bresenham circle | |
function circle(radius) | |
local pixels = {} | |
local switch = 3 - (2 * radius) | |
local x = 0 | |
local y = radius | |
while x <= y do | |
table.insert(pixels, {x, -y}) |
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
import java.util.*; | |
public class BreadthFirstIterator<T> implements Iterator<T> { | |
private Set<T> visited = new HashSet<>(); | |
private Queue<T> queue = new LinkedList<>(); | |
private Graph<T> graph; | |
public BreadthFirstIterator(Graph<T> g, T startingVertex) { | |
if(g.isVertexExist(startingVertex)) { | |
this.graph = g; |
OlderNewer