Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄
______ is best pony.​

Hugo Locurcio Calinou

🦄
______ is best pony.​
View GitHub Profile
@Calinou
Calinou / update-svn.sh
Last active Aug 29, 2015
Updates all Subversion repositories in a directory
View update-svn.sh
#!/bin/bash
# Copyright (c) 2015 Calinou
# CC0 1.0 Universal
# <https://creativecommons.org/publicdomain/zero/1.0/>
update() {
for d in "$@"; do
test -d "$d" -a \! -L "$d" || continue
cd "$d"
@Calinou
Calinou / update-git.sh
Last active Sep 6, 2015
Updates all Git repositories in a directory
View update-git.sh
#!/bin/bash
# Copyright (c) 2015 Calinou
# CC0 1.0 Universal
# <https://creativecommons.org/publicdomain/zero/1.0/>
update() {
for d in "$@"; do
test -d "$d" -a \! -L "$d" || continue
cd "$d"
@Calinou
Calinou / build_javascript.bat
Last active Oct 22, 2016
Compile Godot for HTML5 easily (from Windows)
View build_javascript.bat
:: This script must be run from a Windows system with the Emscripten SDK
:: installed and configured. 7-Zip and MinGW also need to be installed.
:: Place this script at the root of your Godot Git clone.
:: CC0 1.0 Universal
set threads=%NUMBER_OF_PROCESSORS%
:: Set MinGW path
set PATH=%PROGRAMFILES%\mingw-w64\x86_64-6.2.0-posix-seh-rt_v5-rev0\mingw64\bin\;%PATH%
@Calinou
Calinou / build_osx.sh
Last active Mar 7, 2017
Compile Godot for macOS easily
View build_osx.sh
#!/bin/sh -x
# This script must be run from a macOS system 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 / .bintray.json
Last active Jul 6, 2017
Godot build Bintray deployment (Travis, macOS)
View .bintray.json
{
"package": {
"name": "editor",
"repo": "godot",
"subject": "calinou"
},
"version": {
"name": "${VERSION}",
"desc": "Autogenerated Godot Engine Editor build",
"released": "${DATE}",
@Calinou
Calinou / .rtorrent.rc
Created Sep 3, 2017
rTorrent configuration file
View .rtorrent.rc
scgi_port = 127.0.0.1:5000
dht.mode.set = on
protocol.pex.set = yes
trackers.use_udp.set = yes
throttle.max_uploads.set = 100
throttle.max_uploads.global.set = 250
throttle.min_peers.normal.set = 20
throttle.max_peers.normal.set = 60
@Calinou
Calinou / keybase.md
Created Oct 15, 2017
Keybase proof
View keybase.md

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 Oct 15, 2017
Render my avatar into PNGs of several sizes
View render.bat
@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 / godot_android.bat
Created Sep 9, 2017
Compile Godot for Android (from Windows)
View godot_android.bat
@ECHO OFF
set threads=%NUMBER_OF_PROCESSORS%
call scons platform=android tools=no target=release_debug verbose=no warnings=no progress=no -j%threads%
call scons platform=android tools=no target=release verbose=no warnings=no progress=no -j%threads%
cd platform\android\java\
call gradlew build
@Calinou
Calinou / brotli_static.sh
Created Apr 30, 2018
Compress static assets to Brotli (usable by nginx's brotli_static module)
View brotli_static.sh
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
DIR=${1:-}
if [[ "$DIR" == "" ]]; then
echo "Usage: $(basename $0) <path>"
exit 1