Skip to content

Instantly share code, notes, and snippets.

View alfredbaudisch's full-sized avatar

Alfred Reinold Baudisch alfredbaudisch

View GitHub Profile
@msysyamamoto
msysyamamoto / lib-hello_phoenix-memcached_supervisor.ex
Created September 1, 2015 15:13
Poolboy Sample on Phoenix Framework
defmodule HelloPhoenix.Memcached.Supervisor do
use Supervisor
def start_link do
Supervisor.start_link(__MODULE__, [])
end
def init([]) do
pool_options = [
name: {:local, :memcached_pool},
@mattweldon
mattweldon / up-and-running-with-edeliver-on-do.md
Last active September 3, 2021 16:48
Getting Elixir / Phoenix running on Digital Ocean with edeliver

Build Server

  • Go to Digital Ocean
  • Create new droplet
  • London
  • Ubuntu
  • No apps
  • Add SSH keys
Creation of an opposite macro
We want opposite 1 + 1
to return to 0 or essentially run 1 - 1
opposite 1 + 1
Transforms 1 + 1 into an AST
opposite({:+, [], [1,1]}
Our macro would then transform that AST (Abstract syntax tree)
@ulrikdamm
ulrikdamm / EditPrefab.cs
Last active May 10, 2023 07:44
Unity editor script for better editing of prefabs. Put in Assets/Editor.
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
// Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser).
// This opens an empty scene with your prefab where you can edit it.
// Put this script in your project as Assets/Editor/EditPrefab.cs
public class EditPrefab {
static Object getPrefab(Object selection) {
@andrew-wilkes
andrew-wilkes / circular-progress.shader
Created January 16, 2020 11:41
Circular Progress Shader in Godot Engine
shader_type canvas_item;
uniform float value: hint_range(0, 100); // %
uniform float thickness: hint_range(0, 100) = 30.; // % thickness
uniform sampler2D fg: hint_albedo;
uniform sampler2D bg: hint_black_albedo;
uniform float offset: hint_range(0, 100); // %
uniform float smoothing: hint_range(0, 100) = 5.;
void fragment() {
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 3, 2024 10:01
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@hmans
hmans / BobTheBuilder.cs
Last active April 27, 2024 23:26
A basic pipeline for performing headless Unity builds for multiple platforms at once.
/* This needs to live in a folder named "Editor", or it won't work. Doesn't have to be named
"BobTheBuilder", though. Name it whatever you want! */
using System;
using UnityEditor;
using UnityEngine;
public class BobTheBuilder
{
/* List of scenes to include in the build */
@winston-yallow
winston-yallow / test.gd
Last active January 25, 2024 06:32
Godot 4.x Compute Example
extends Node
# Based on this tweet by Clay John:
# https://twitter.com/john_clayjohn/status/1306447928932753408
func _ready() -> void:
# Create a local rendering device.
var rd := RenderingServer.create_local_rendering_device()
@wojtekpil
wojtekpil / hterrain_detail_enhanced.shader
Last active October 11, 2023 19:14
Hterrain enhanced shader for detail layers
shader_type spatial;
render_mode cull_disabled, blend_mix,diffuse_burley, specular_schlick_ggx;
uniform sampler2D u_terrain_heightmap;
uniform sampler2D u_terrain_detailmap;
uniform sampler2D u_terrain_normalmap;
uniform sampler2D u_terrain_globalmap : hint_albedo;
uniform mat4 u_terrain_inverse_transform;
uniform mat3 u_terrain_normal_basis;
@Makeshift
Makeshift / tutorial.md
Last active March 28, 2024 02:33
Tutorial for automatically syncing an Obsidian vault with Git on an Android device

How to sync Obsidian with Git on Android

Limitations

  • If Termux is closed in the background by Android, the cron service will stop updating your repository and you must open Termux again. Refer to instructions for your device model to disable the killing of certain background applications.
  • This may negatively affect your devices battery life. I'm not entirely sure yet.

Setup