Skip to content

Instantly share code, notes, and snippets.

Config = {
Map = "aduermael.hills",
Items = { "jacksbertox.easel" }
}
-------------------
--== Constants ==--
-------------------
@aduermael
aduermael / discord-help-1.lua
Last active March 30, 2023 19:10
discord-help-1.lua
Config = {
Map = "aduermael.lovely_castle"
}
Client.OnStart = function()
multi = require("multi")
-- Client.OnStart is the first function called on each player device
-- It's a good place to build a user interface, setup things that you
@aduermael
aduermael / ludumdare52.lua
Last active January 8, 2023 20:46
Ludum-Dare-52
--[[
EAT YOUR FRUITS
Made this game in 48h for Ludum Dare 52 (https://ldjam.com/events/ludum-dare/52/eat-your-fruits).
- [X] players should collide with tree, /!\ though, shake scale should push back
- [X] fix punch (trigger far from a tree, then move to touch a tree)
- [x] auto-destroy fruits if not collected
- [x] set max number of collected fruits
@aduermael
aduermael / deploy-docker-registry.md
Last active April 30, 2018 17:20
Docker registry server with basic auth restricted access

How to deploy a registry server with basic auth restricted access

  • Create cert with Let's Encrypt
git clone https://github.com/letsencrypt/letsencrypt.git
cd letsencrypt
./letsencrypt-auto certonly
@aduermael
aduermael / docker.bash
Last active November 18, 2016 19:02
.bash_profile for docker commands
docker() {
local realDocker=$(which docker)
# shorter `docker ps`
if [[ "$1" == "ps" ]] && [[ $* != *-q* ]]
then
if [[ $* == *-s* ]]
then
$realDocker $@ --format "table {{.Image}}\t{{.Ports}}\t{{.Status}}\t{{.Names}}\t{{.Size}}"
else
$realDocker $@ --format "table {{.Image}}\t{{.Ports}}\t{{.Status}}\t{{.Names}}"
@aduermael
aduermael / redisCommands.md
Created October 10, 2016 21:46
redis one-liners

Remove all keys with given prefix

  eval 'local keys = redis.call("keys", ARGV[1]); redis.call("del", unpack(keys));' 0 "prefix*"
@aduermael
aduermael / dockerTunnel.md
Created August 17, 2016 21:22
Connect to remote Docker engine through SSH tunnel

Bind remote docker.sock with SSH tunnel:

ssh -nNT -L /tmp/docker.sock:/var/run/docker.sock  <USER>@<IP> &

Set environment variable for local Docker client:

export DOCKER_HOST=unix:///tmp/docker.sock