Skip to content

Instantly share code, notes, and snippets.

View aniongithub's full-sized avatar

Ani aniongithub

View GitHub Profile
@aniongithub
aniongithub / Graffiti abstract
Created September 7, 2012 13:12
Graffiti: A different approach to cross- platform game development
Game engines today are mostly about providing the maximum graphics performance and customizability, which is in trend with the hardware. Unfortunately, they are also API-like in nature, requiring initialization/calls in a particular sequence and in having to manage their state externally. Creating complex effects also often involves writing/generating a combination of shaders, code and data files – which can often get out of sync or be hard to maintain.Graffiti bucks the trend by providing a simple set of declarative-syntax based open source libraries that are set-up-and-go oriented. Almost all of the data Graffiti needs is designed to be written directly as readable, markup-like C# code (or serialized/deserialized), which makes it robust and type-safe. Core tenets of Graffiti include Quake 3 style shaders, simple key frame based animation and batched rendering. Each module of Graffiti is focused on a handful of tasks, which other pieces leverage.It is also written on top of XNA/MonoGame and its most compatib
@aniongithub
aniongithub / Dockerfile
Created February 22, 2019 20:59
Debugging with Docker and VS Code
FROM microsoft/dotnet:sdk
COPY . /source
WORKDIR /bin
RUN dotnet build /source/dockerdebug.csproj -o /app
WORKDIR /app
CMD ["dotnet", "dockerdebug.dll"]
@aniongithub
aniongithub / CMakeLists.txt
Last active June 26, 2019 19:40
Building native Node.js modules with node-cmake, nbind and conan
cmake_minimum_required(VERSION 3.1)
project(nbind VERSION 1.0.0)
add_definitions(-DBUILDING_NODE_EXTENSION)
add_definitions(-DUSING_V8_SHARED)
add_definitions(-DUSING_UV_SHARED)
add_definitions(-DV8_DEPRECATION_WARNINGS)
include(node_modules/node-cmake/NodeJS.cmake)
@aniongithub
aniongithub / Dockerfile
Last active December 1, 2019 04:53
Files required to run Color-Names (https://github.com/airalcorn2/Color-Names) in Docker
FROM tensorflow/tensorflow:latest-py3
RUN apt-get update \
&& apt-get install -y \
wget \
gzip
WORKDIR /usr/local/src/Color-Names/
COPY . /usr/local/src/Color-Names/
@aniongithub
aniongithub / docker-create.sh
Created December 11, 2019 23:44
docker-machine create script for any machine you can ssh into
#! /bin/bash
# To invoke with named arguments, use
# https://unix.stackexchange.com/a/129394/358706
REMOTE_USER="user"
REMOTE_EMAIL="your@email.here"
REMOTE_HOSTNAME="hostname_here"
REMOTE_KEYNAME="${REMOTE_HOSTNAME}.id.rsa"
REMOTE_IPADDRESS=`dig +short $REMOTE_HOSTNAME`
@aniongithub
aniongithub / nativelib.pxd
Created January 22, 2021 07:21
seamless-python-interop
from libc.stddef cimport (
ptrdiff_t, size_t, wchar_t
)
from libc.stdint cimport (
int16_t, int32_t, int64_t, int8_t, int_fast16_t, int_fast32_t,
int_fast64_t, int_fast8_t, int_least16_t, int_least32_t, int_least64_t,
int_least8_t, intmax_t, intptr_t, uint16_t, uint32_t, uint64_t, uint8_t,
uint_fast16_t, uint_fast32_t, uint_fast64_t, uint_fast8_t, uint_least16_t,
uint_least32_t, uint_least64_t, uint_least8_t, uintmax_t, uintptr_t
)
@aniongithub
aniongithub / Dockerfile
Created February 4, 2021 17:04
Install .NET Core inside a Dockerfile
# Install .NET Core and ensure system can find it
# Bug: https://github.com/dotnet/sdk/issues/9911
RUN wget -P /tmp https://dot.net/v1/dotnet-install.sh &&\
chmod +x /tmp/dotnet-install.sh &&\
/tmp/dotnet-install.sh &&\
ln -sfn ~/.dotnet/dotnet /usr/local/bin/dotnet
@aniongithub
aniongithub / creation.log
Created March 16, 2021 17:39
Codespaces issue with nativelibrary-dotnet-core
2021-03-16T17:28:39: $ nvidia-smi
2021-03-16T17:28:40: @microsoft/vscode-dev-containers-cli 0.0.22.
2021-03-16T17:28:40: Start: Resolving Remote
2021-03-16T17:28:40: $ docker ps -q -a --filter label=Type=codespaces
2021-03-16T17:28:40: $ docker -v
2021-03-16T17:28:40: $ docker events --format {{json .}} --filter event=start
2021-03-16T17:28:40: Start: Starting container
2021-03-16T17:28:40: $1.2.0
2021-03-16T17:28:41: $ docker ps -q -a --filter label=Type=codespaces
2021-03-16T17:28:41: $ docker inspect --type container 162ec0f79b5e
@aniongithub
aniongithub / access_point
Last active April 30, 2021 03:36
Enable/Disable AP mode on a Raspberry Pi
#! /bin/bash
# Requires hostapd and dnsmasq packages installed
# Parse options using getopt
# https://www.codebyamir.com/blog/parse-command-line-arguments-using-getopt
opts=$(getopt \
--longoptions "on,off" \
--name "$(basename "$0")" \
--options "" \
@aniongithub
aniongithub / CodeSpaces log
Created May 26, 2021 02:54
Codespaces failure - nativelibrary-dotnet-core
Configuration starting...
2021-05-26T02:44:31: $ git -C "/var/lib/docker/codespacemount/workspace" clone --depth 1 https://github.com/aniongithub/nativelibrary-dotnet-core "/var/lib/docker/codespacemount/workspace/nativelibrary-dotnet-core"
2021-05-26T02:44:31: Cloning into '/var/lib/docker/codespacemount/workspace/nativelibrary-dotnet-core'...
2021-05-26T02:44:31: git process exited with exit code 0
2021-05-26T02:44:33: $ git -C "/var/lib/docker/codespacemount/workspace/nativelibrary-dotnet-core" config --local remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
2021-05-26T02:44:33: git process exited with exit code 0
2021-05-26T02:44:33: @microsoft/vscode-dev-containers-cli 0.0.32.
2021-05-26T02:44:33: $ docker build -f /var/lib/docker/codespacemount/workspace/nativelibrary-dotnet-core/Dockerfile -t vsc-nativelibrary-dotnet-core-cdd73e13f35b6b589436a7f80ab2a349 /var/lib/docker/codespacemount/workspace/nativelibrary-dotnet-core
2021-05-26T02:44:34: Sending build context to Docker daemon 101.4kB
2021-05-