Skip to content

Instantly share code, notes, and snippets.

@athalean
athalean / pathfinding.gd
Created March 9, 2017 09:15
Godot A* pathfinding
func grid_to_world(position):
# (0,8) is the offset to the middle of the tile
return map_to_world(position) + Vector2(0, 8)
func world_to_grid(position):
return world_to_map(position)
func get_tile_cost(pos):
# placeholder
return 1.0
extern crate core;
use std::collections::HashSet;
use std::sync::{Mutex, Arc};
use core::cmp::Ordering;
use std::thread;
struct Emitter {
count: Mutex<i32>,
maximum: i32
@athalean
athalean / gist:f0abbb817f0d6dce3829
Created May 21, 2014 10:13
query ActiveDirectory and exclude inactive users
(&(sAMAccountName=%(user)s)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
@athalean
athalean / gist:11398437
Created April 29, 2014 12:15
enable starrypy auth
/enable_plugin db_auth_plugin
/new_user user password