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 / build_android.sh
Last active May 27, 2019 16:26
Compile Godot for Android easily
#!/bin/sh -x
# This script compiles Android debug and release templates from a Godot Git clone.
# It needs to be run from a GNU/Linux system. The compilation process will automatically
# use all CPU threads available.
# You will need to install Android SDK (API 23), the build tools,
# the Android Support Repository and the NDK (latest, as of November 2016).
# Place this script at the root of your Godot Git clone.
# CC0 1.0 Universal
@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 / cmd-calinou-colors.reg
Created September 7, 2017 17:16
Color schemes for the Windows Command Prompt and Windows PowerShell
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console]
"ColorTable00"=dword:00242424
"ColorTable01"=dword:00FFAA77
"ColorTable02"=dword:0077EE77
"ColorTable03"=dword:00EEEE77
"ColorTable04"=dword:007777FF
"ColorTable05"=dword:00EE77EE
"ColorTable06"=dword:0077EEEE
@Calinou
Calinou / build_iphone.sh
Last active August 20, 2019 08:33
Compile Godot for iOS easily (from macOS)
#!/bin/sh -x
# This script must be run from a macOS machine with Xcode installed.
# Place this script at the root of your Godot Git clone.
# CC0 1.0 Universal
# Number of CPU threads to use for compilation (no "nproc" on macOS...)
nproc=4
@Calinou
Calinou / calinou.conf
Last active April 14, 2020 21:00
Configuration file used on my Minetest server
# These settings are used on Calinou [Europe/Paris].
## General
name = Calinou
motd = Welcome to a Calinou's server, hosted in Paris, France.
remote_media = http://games.hugo.pro/minetest/calinou/
default_password = 123
server_announce = true
server_name = Calinou [Europe/Paris] - default password: 123
@Calinou
Calinou / build_iphone.sh
Last active September 1, 2020 00:19
Compile Godot for iOS easily (from Linux)
#!/bin/sh -x
# This script compiles Godot for iOS in 64-bit and 32-bit.
# It must be run from a GNU/Linux system.
# Place this script at the root of your Godot Git clone.
# CC0 1.0 Universal
# This needs to be set so that SCons detects OS X as a valid option
export OSXCROSS_IOS="anything"
@Calinou
Calinou / matterbridge.toml
Last active September 11, 2020 12:18
Godot Discord-IRC bridge configuration (Matterbridge)
[irc]
[irc.freenode]
Server="irc.freenode.net:6697"
Nick="GDDiscord"
NickServNick="GDDiscord"
NickServPassword="SECRET"
UseTLS=true
UseSASL=true
SkipTLSVerify=false
EditDisable=false
@Calinou
Calinou / no-agc.sh
Last active September 14, 2020 13:08
Disable/bypass PulseAudio automatic gain control
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
while sleep 0.1; do
# Use `pacmd list-sources` to get the input source name.
# 65535 is 100% volume.
pacmd set-source-volume alsa_input.pci-0000_00_1f.3.analog-stereo 40000
done
@Calinou
Calinou / fade-to-black.sh
Created January 11, 2020 17:13
Generate a set of PNG frames that fade towards black
#!/bin/bash
START=599
for i in {600..700}; do
brightness="$((700-i))"
convert "$START.png" -modulate "$brightness%" "$i.png" &
done
@Calinou
Calinou / clang-format.sh
Created March 3, 2020 14:50
Portable shell script to format all files in a folder recursively using clang-format
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
find . \( -name '*.cpp' -o -name '*.hpp' -o -name '*.c' -o -name '*.h' \) \
-exec clang-format -i {} \;