Skip to content

Instantly share code, notes, and snippets.

View Calinou's full-sized avatar
🦄
______ is best pony.​

Hugo Locurcio Calinou

🦄
______ is best pony.​
View GitHub Profile
@Calinou
Calinou / minetest.service
Last active June 17, 2022 18:45
Minetest server systemd service file, put in /etc/systemd/system/minetest.service
[Unit]
Description=Minetest
[Service]
Type=simple
User=hugo
Group=hugo
ExecStart=/usr/local/bin/minetestserver --gameid minetest_game --config /home/hugo/.minetest/configs/calinou.conf
Restart=on-failure
@Calinou
Calinou / mapper.sh
Last active March 9, 2022 00:54
Script to create a map of a Minetest world (then optimize it using oxipng)
#!/bin/bash
set -euo pipefail
MAP_DIR="/home/hugo/.minetest/worlds/calinou"
TEMP_FILE="/tmp/map_calinou.png"
OUTPUT_FILE="/var/www/games.hugo.pro/minetest/map_calinou.png"
echo "Rendering map, this may take a while…"
/usr/local/bin/minetestmapper \
@Calinou
Calinou / keybase.md
Created October 15, 2017 20:06
Keybase proof

Keybase proof

I hereby claim:

  • I am calinou on github.
  • I am calinou (https://keybase.io/calinou) on keybase.
  • I have a public key ASBWFkyj4HxyO42KjpXXu-CEFDsgWgpMXTIBW6EvTxGTcwo

To claim this, I am signing this object:

@Calinou
Calinou / render.bat
Created October 15, 2017 23:04
Render my avatar into PNGs of several sizes
@ECHO OFF
mkdir "dist\"
for /L %%a in (24, 24, 480) do (
convert -scale %%a "src\avatar-foreground.png" "%TMP%\avatar-foreground-%%a.png"
"%PROGRAMFILES%\Inkscape\inkscape.exe" "src\avatar-background.svg" --export-width %%a --export-height %%a --export-png "%TMP%\avatar-background-%%a.png"
composite "%TMP%\avatar-foreground-%%a.png" "%TMP%\avatar-background-%%a.png" "%TMP%\avatar-%%a.png"
oxipng -o6 "%TMP%\avatar-%%a.png"
copy "%TMP%\avatar-%%a.png" "dist\avatar-%%a.png"
@Calinou
Calinou / camera.gd
Last active July 12, 2019 05:27
Freelook camera script from my Sponza demo
# Copyright © 2017 Hugo Locurcio and contributors - MIT license
# See LICENSE.md included in the source distribution for more information.
extends Camera
const MOVE_SPEED = 0.5
const MOUSE_SENSITIVITY = 0.002
onready var speed = 1
onready var velocity = Vector3()
onready var initial_rotation = PI/2
@Calinou
Calinou / godot_mingw.sh
Last active July 8, 2023 23:17
Compile Godot using MinGW and generate Windows installers using InnoSetup (from Linux)
#!/bin/sh
set -euo pipefail
# Number of CPU threads to use for building
# Use `./godot_mingw.sh <number of threads>` to specify
THREADS=$1
# Godot Git clone path
GODOT_PATH="$HOME/Documents/Git/godotengine/godot"
@Calinou
Calinou / brotli_static.sh
Created April 30, 2018 17:54
Compress static assets to Brotli (usable by nginx's brotli_static module)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
DIR=${1:-}
if [[ "$DIR" == "" ]]; then
echo "Usage: $(basename $0) <path>"
exit 1
@Calinou
Calinou / product.json
Created May 10, 2018 19:47
Code - OSS extension gallery
{
...
"extensionsGallery": {
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
"itemUrl": "https://marketplace.visualstudio.com/items"
}
}
@Calinou
Calinou / render_texts.sh
Created June 4, 2018 21:54
Render text overlays for use with the Blender Video Sequence Editor
#!/bin/bash
#
# Renders text captions for videos; targeted at Blender usage.
# Usage: ./render.sh
#
# Copyright © 2018 Hugo Locurcio
# Licensed under CC0 1.0 Universal: https://creativecommons.org/publicdomain/zero/1.0/
set -euo pipefail
IFS=$'\n\t'
@Calinou
Calinou / render_intro_outro.sh
Created June 4, 2018 21:55
Render intro/outro images for use with the Blender Video Sequence Editor
#!/bin/bash
#
# Renders video intro/outro images; targeted at Blender usage.
# Usage: ./render.sh
#
# Copyright © 2018 Hugo Locurcio
# Licensed under CC0 1.0 Universal: https://creativecommons.org/publicdomain/zero/1.0/
set -euo pipefail
IFS=$'\n\t'