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 / Caddyfile
Created October 3, 2020 19:54
Caddyfile for hosting PHP/October website locally (place in the app's root folder)
http://localhost:8000
encode gzip
php_fastcgi unix//var/run/php-fpm/www.sock
file_server
@Calinou
Calinou / script.sh
Last active October 30, 2020 17:18
Bash script boilerplate (safer programming practices + allow running from any location without using `cd` beforehand)
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@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'

I was able to activate it, if anyone needs, just follow these steps:

1: edit:

sudo vim /usr/local/etc/php-fpm.d/www.conf

2: add to the end of the file:

@Calinou
Calinou / script.py
Last active January 15, 2021 17:58
Python template for utilities and helper scripts
#!/usr/bin/env python
import os
def main() -> None:
# Change to the directory where the script is located,
# so that the script can be run from any location.
os.chdir(os.path.dirname(os.path.realpath(__file__)))
@Calinou
Calinou / download-all.sh
Created January 28, 2021 21:51
Script to download all Godot artifacts for a release from TuxFamily (for mirroring purposes)
#!/usr/bin/env bash
# Copyright © 2019-2021 Hugo Locurcio
# Licensed under the MIT license.
set -xeuo pipefail
IFS=$'\n\t'
export DIR
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@Calinou
Calinou / README.md
Created February 20, 2021 19:12
Configuration for running git-code-debt on the Godot repository
  1. Install Python 3.6 or later and pip then run pip install --user --upgrade git-code-debt.
  2. Save generate_config.yaml and metric_config.yaml in the same folder.
  3. Run git-code-debt-generate. This will take a few minutes.
  4. Run git-code-debt-server database.db and open the address that appears in the console output in a web browser.

See for more information.

@Calinou
Calinou / versions.json
Last active April 15, 2021 12:43
Godot versions available in JSON form (for testing the built-in update checker)
{
"releases": {
"4.1.1": {
"date": "2021-04-15",
"news_url": "https://godotengine.org/news",
"description": "Godot 3.3 has been released!\n\nThis release features significant improvements to 2D and 3D rendering, a new FBX importer, Android App Bundle support, and much more."
},
"4.1": {
"date": "2021-04-15",
"news_url": "https://godotengine.org/news",
@Calinou
Calinou / metric_config.yaml
Created April 28, 2021 23:01
Metrics generator for the Godot Git repository (see https://github.com/asottile/git-code-debt)
# This is a sample metric config
# Sample Groups definition:
# Groups:
# Group1:
# metrics:
# - FooMetric
# - BarMetric
# metric_expressions:
# - ^.*Baz.*$
@Calinou
Calinou / bottom.html
Created August 7, 2021 13:03
Backup of the syntax highlighting blocks on the Godot Q&A
<script defer src="/qa/highlightjs/highlight.min.js"></script>
<script defer src="/qa/highlightjs/highlight.gdscript.min.js"></script>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll('pre code').forEach((block) => {
hljs.highlightBlock(block);
});
});
</script>