Skip to content

Instantly share code, notes, and snippets.

View lemilonkh's full-sized avatar

Milan Gruner lemilonkh

View GitHub Profile
@passivestar
passivestar / Editor.tres
Last active April 10, 2024 20:07
Godot editor theme
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://7bvxnk5n5imx"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h42l"]
content_margin_left = 10.5
content_margin_top = 8.75
content_margin_right = 10.5
content_margin_bottom = 8.75
bg_color = Color(0.117647, 0.117647, 0.117647, 1)
draw_center = false
border_color = Color(1, 1, 1, 0.137255)
@Enichan
Enichan / jrpg.js
Created September 17, 2023 16:54
Tiny Tiled Map Editor binary exporter plugin
var binaryFormat = {
name: "jRPG binary format",
extension: "bin",
write: function(map, fileName) {
var m = {
width: map.width,
height: map.height,
layers: []
};
@wchargin
wchargin / multiplyFloat.js
Created April 13, 2020 04:24
multiply bigint by float in JS (spoiler alert: BigInt has no useful functions)
/**
* For a finite normal 64-bit float `f`, extracts integers `sgn`,
* `exponent`, and `mantissa` such that:
*
* - `sgn` is -1 or +1
* - `exponent` is between -1023 and 1024, inclusive
* - `mantissa` is between 0 and 2^51 - 1, inclusive
* - the number given by `f` equals `sgn * 2^exponent * (1 + mantissa / 2^52)`
*
* The results are all bigints within the range of safe integers for
@lemilonkh
lemilonkh / hexamin.c
Created October 6, 2011 19:09
Hexamin - An air controlled synthesizer
// hexamin.c
// (c) 2011 by Milan Gruner
// designed for ATmega8
#define F_CPU 8000000L
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
@lemilonkh
lemilonkh / index.html
Created October 31, 2010 12:39
Le Milonkh's jQuery plugin for displaying clouds on a website.
<!DOCTYPE html>
<!-- http://twitter.com/lemilonkh -->
<html>
<head>
<title>Clouds</title>
<meta type="content-encoding" content="UTF-8" />
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.clouds.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {