Skip to content

Instantly share code, notes, and snippets.

View alanjfs's full-sized avatar
💭
The villain

Alan Jefferson alanjfs

💭
The villain
View GitHub Profile
@define-private-public
define-private-public / nim_opengl_shader_example.nim
Last active September 26, 2019 05:59
An example of using OpenGL shaders (and indexed drawing) in Nim
# File: nim_opengl_shader_example.nim
# Author: Benjamin N. Summerton <define-private-public>
# Description: An example of how to use OpenGL shaders in Nim. Draws a simple
# rotating hexagon with 6 colors. Also uses indexed drawing.
#
# Uses this GLFW binding: https://github.com/rafaelvasco/nimrod-glfw, though if
# want to use SDL2, changing out the windowing should be simple.
#
# This was built on Linux using OpenGL ES 3. If you want to use a different
# OpenGL version then you will have to alter the shader source.
@oglops
oglops / AEaddModelPanel.py
Last active March 26, 2021 22:34
embed a model panel into script editor with xml attribute editor template in maya 2015
import maya.cmds as cmds
import maya.utils as mutils
def AEaddModelPanelModule( plug, uiLabel, annot):
paneLayoutName = cmds.paneLayout(h=300)
modelPanel = "customModelPanel"
if cmds.modelPanel(modelPanel, q=1, ex=1):
cmds.modelPanel(modelPanel, e=1, p=paneLayoutName)
else:
@bkaradzic
bkaradzic / orthodoxc++.md
Last active July 19, 2024 23:17
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?