Skip to content

Instantly share code, notes, and snippets.

View bojidar-bg's full-sized avatar

Bojidar Marinov bojidar-bg

View GitHub Profile
@bojidar-bg
bojidar-bg / boxit-solver.js
Created June 18, 2020 00:37
BOXit solver
// This file is made available under the GPLv3 LICENSE
// For more info, see https://www.gnu.org/licenses/gpl-3.0.html
// Based on ideas presented in https://hatnix.itch.io/boxit
function main() {
// HGrid format:
// All whitespace is ignored.
// Other characters represent tuples of color and symbol
// Colors are [w]hite/[r]ed, [b]lue, [g]reen, [o]range/[y]ellow, [p]urple/pink
@bojidar-bg
bojidar-bg / Update assets
Last active April 2, 2020 13:24
Scripts for updating Godot demo assets
Scripts for updating Godot demo assets
LICENSE:
Copyright (c) 2020 Bojidar Marinov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@bojidar-bg
bojidar-bg / raymarching.html
Created July 30, 2018 19:52
WebGL Raymarcher
<!DOCTYPE html>
<!-- Thanks to Inigo Quillez (http://iquilezles.org) for many of the functions in the shader code. -->
<!-- Thanks to MDN for being awesome. -->
<!-- Thanks to WebGLFundamentals (https://webglfundamentals.org) for their framebuffer tutorial. -->
<!-- Thanks to gl-matrix.js for the matrix library, and Stats.js for the FPS counter. -->
<html>
<head>
<meta charset="utf-8">
<title>Raymarcher</title>
<style media="screen">
@bojidar-bg
bojidar-bg / build-helpers.sh
Last active November 17, 2016 15:27
Godot-buildscripts -- a few buildscripts useful for developing godot
#!/bin/bash
## Helps build/debug/test a Godot (usable for non-godot things as well)
##################
#-----Common-----#
##################
function start {
start=1$(date -u +"%s")
@bojidar-bg
bojidar-bg / gpfamr.sh
Last active November 2, 2016 14:37
GPFAMR - Godot "Project" Fixers After Mass Rename (move)
#!/usr/bin/env bash
v=$(echo "$@" | grep -- '-v')
d=$(echo "$@" | grep -- '-d')
sed_command=''
# Doesn't support spaces in names :|
for cf in $(find . -not -path '*.git*' -not -name '* *' -type f | sed 's|\./||g'); do
if [ ! -z "$v" ]; then
@bojidar-bg
bojidar-bg / LinkedList.gd
Last active July 22, 2024 21:38
DEPRECATED Linked List for Godot -- see link below
##
## WARNING: Deprecated. Use https://gist.github.com/belzecue/6253c8c694d602e715fff0b3f4303344/ instead.
##
extends Reference
class LinkedListItem:
extends Reference
var next = null
function encript(current, previous) {
previous = previous || 0;
return (current + previous)%27;
}
var Canvas = require("canvas");
var fs = require("fs");
var source = process.argv[2];
//---PREPARE---
source = source.toUpperCase();