Skip to content

Instantly share code, notes, and snippets.

View blockspacer's full-sized avatar
:octocat:

Devspace blockspacer

:octocat:
  • Google
  • USA
View GitHub Profile
@blockspacer
blockspacer / mem_function_traits.cpp
Created November 6, 2019 07:59 — forked from vmrob/mem_function_traits.cpp
Member Function Traits
#include <utility>
#include <functional>
#include <type_traits>
#include <typeinfo>
#include <iostream>
namespace meta {
// detects callable objects, not functions
FROM alpine:latest AS devel
RUN apk --no-cache add git
RUN mkdir /app
RUN touch /app/foo
FROM scratch AS runtime
COPY --from=devel /app/. /app
@blockspacer
blockspacer / Godot Minimap.md
Created February 15, 2020 14:27 — forked from EIREXE/Godot Minimap.md
Automatic minimap generation in godot

Building an automated map/minimap system in Godot

Why?

Our game, ERO-ONE needed a minimap system, it being an open world game made this a necessity, otherwise the player wouldn't really know where he's going.

Of course making a proper minimap is hard, we told ourselves that our game didn't really need it because it's not as big as the open world powerhouse that is Grand Theft Auto, but the real reasons are...

shader_type spatial;
render_mode shadows_disabled;
uniform float rim = 0.25;
uniform float rim_tint = 0.5;
uniform sampler2D albedo : hint_albedo;
uniform float specular;
uniform float roughness = 1.0;
uniform bool disable_lighting = false;
uniform vec4 shadow_color : hint_color;
@blockspacer
blockspacer / gist:79afe97dd5c0082b9b2ee9aca75ff704
Created February 19, 2020 16:33 — forked from iandyh/gist:5a1b1de9a46c6fa385f1
Install Git with OpenSSL on Ubuntu
# install git with openssl
ENV GIT_VERSION 1.9.1
ENV PLATFORM 1ubuntu0.1
ENV GIT ${GIT_VERSION}-${PLATFORM}
RUN apt-get install -y build-essential dpkg-dev
RUN mkdir -p git-openssl
WORKDIR /tmp/git-openssl
RUN apt-get source git=1:${GIT}
RUN apt-get -y build-dep git
RUN dpkg-source -x git_${GIT}.dsc
@blockspacer
blockspacer / generate_docker_cert.sh
Created February 28, 2020 10:18 — forked from bradrydzewski/generate_docker_cert.sh
Generate trusted CA certificates for running Docker with HTTPS
#!/bin/bash
#
# Generates client and server certificates used to enable HTTPS
# remote authentication to a Docker daemon.
#
# See http://docs.docker.com/articles/https/
#
# To start the Docker Daemon:
#
# sudo docker -d \
#define INPUTPLANE 1
precision highp float;
uniform sampler2D tex;
uniform mat3 weight[128];
uniform vec2 pixSize;
uniform float bias;
varying vec2 uv;
void main() {
vec4 inputOffset[1];
inputOffset[0] = vec4(0,0,0.062499,0.124999);
@blockspacer
blockspacer / .gitignore
Created March 24, 2020 19:00 — forked from bjin/.gitignore
ravu-hlsl
*.spv
@blockspacer
blockspacer / coroutine.h
Created April 28, 2020 21:21 — forked from romandev/coroutine.h
Hacky coroutine
#ifndef COROUTINE_H_
#define COROUTINE_H_
#include <memory>
#include "base/bind.h"
using Coroutine = std::function<void(void*, void*)>;
#define co_resume_with_data(coroutine, result_ref) \
(*coroutine)(coroutine, result_ref)

13 valuable things I learned using CMake

Author : Dua Guillaume
Date : 04-26-2020

Requirement : A first experience with CMake

Intro

As a modern C++ specialist, my job is to focus on software development, from a performance and quality perspective.