Skip to content

Instantly share code, notes, and snippets.

View ChristianGreiner's full-sized avatar
👋
Hello World

Christian Greiner ChristianGreiner

👋
Hello World
View GitHub Profile
@pojda
pojda / example_image_utils.py
Last active December 3, 2023 15:24 — forked from josephkern/example_image_utils.py
Layer on top of Python Imaging Library (PIL) to write text in images easily
#!/usr/bin/env python
# coding: utf-8
# You need PIL <http://www.pythonware.com/products/pil/> to run this script
# Download unifont.ttf from <http://unifoundry.com/unifont.html> (or use
# any TTF you have)
# Copyright 2011 Álvaro Justen [alvarojusten at gmail dot com]
# License: GPL <http://www.gnu.org/copyleft/gpl.html>
from image_utils import ImageText
@prabindh
prabindh / dirlist_creator.py
Created May 4, 2019 02:56
Create directory listing tree in python and output in JSON
import os
import json
def path_to_dict(path):
d = {'name': os.path.basename(path)}
if os.path.isdir(path):
d['type'] = "directory"
d['children'] = [path_to_dict(os.path.join(path,x)) for x in os.listdir\
(path)]
else:
Texture2D[] layers;
Texture2D compiledTexture = new Texture2D(layers[0].width, layers[0].height);
foreach(Texture2D layer in layers){
Color[] baseColors = compiledTexture.GetPixels();
Color[] layerColors = layer.GetPixels();
for(int p = 0; p < baseColors.Length; p++){
@hkamran80
hkamran80 / SmartTV2.txt
Last active February 28, 2024 01:03
Pi-hole Blocklist for Smart TVs
# THIS FILE IS NO LONGER BEING MAINTAINED. FOR A MAINTAINED VERSION, PLEASE USE THE VERSION IN THE NEW REPOSITORY.
# Repository: https://github.com/hkamran80/blocklists
# New link for this file: https://raw.githubusercontent.com/hkamran80/blocklists/main/smart-tv
# ------
# This is a blocklist to block Smart TVs sending data home.
# Please help to collect domains!
# It could be that the TV does not receive any more updates or other services no longer work. Please report such an incident.
@andrewelkins
andrewelkins / install-docker-on-linux-mint-18.sh
Last active February 2, 2020 21:53
Install Docker on Linux Mint 18
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/andrewelkins/1adc587feb610f586f8f40b50b7efc3a/install-docker-on-linux-mint-18.sh | bash -x
##########################################
# Kernel version http://stackoverflow.com/a/4024263
versionlte() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
versionlt() {
@mfep
mfep / Controller2D.cs
Created August 30, 2016 22:10
character controller for Duality2D
using System;
using System.Collections.Generic;
using System.Linq;
using Duality;
using Duality.Components.Renderers;
using Duality.Components.Physics;
namespace TilemapJam
{

GLSL

Keeping track of key concepts, maybe eventually make it tutorial style but is more like a reference. Based off of shader-school lessons (especially some code examples).

Spoiler warning: includes solutions to shader-school lessons.

Scalar Types

@MikeGringauz
MikeGringauz / Spaceship.cs
Last active August 22, 2016 14:18
TinyTween engine adopted to Duality 2D game engine with sample Spaceship component demo.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Duality;
using Duality.Components.Physics;
using Duality.Components.Renderers;
using Duality.Input;
using TinyTween;
using System;
using System.Runtime.InteropServices;
// ReSharper disable SuspiciousTypeConversion.Global
// ReSharper disable InconsistentNaming
namespace VideoPlayerController
{
/// <summary>
/// Controls audio using the Windows CoreAudio API
/// from: http://stackoverflow.com/questions/14306048/controling-volume-mixer
@parmentf
parmentf / GitCommitEmoji.md
Last active April 25, 2024 08:18
Git Commit message Emoji