Skip to content

Instantly share code, notes, and snippets.


Alexey Gulev AGulev

View GitHub Profile
Vbif / file.cpp
Last active Apr 5, 2021
Defold - auto register enums
View file.cpp
// test compile
typedef double lua_Number;
typedef struct {} lua_State;
void lua_pushnumber (lua_State *L, lua_Number n) {}
void lua_setfield (lua_State *L, int index, const char *k) {}
// test
#include <stdlib.h>
#include <string.h>
View nodeiter.c
typedef struct {
// These fields are internal state and not considered part of the public interface.
Node *parent;
int next_index;
// This field is public and valid to read after a call to next that returns true.
Node *child;
} Iter;
Iter iter_children(Node *node) {
aglitchman / compile_shader.editor_script
Last active Nov 30, 2021
Editor script for Defold IDE. The script adds the menu items "Compile Fragment Shader" and "Compile Vertex Shader" for .fp/.vp files.
View compile_shader.editor_script
-- Download and install Arm Mobile Studio from
local M = {}
local function ends_with(str, ending)
return ending == "" or str:sub(-#ending) == ending
function M.get_commands()
dapetcu21 /
Created Apr 27, 2018
Interrogation Style Guide

Lua style guide


This project makes use of [Luacheck] for catching common mistakes. Install it and configure it for your text editor.

Editor configuration

We recommend [Atom] for editing Lua code along with the following packages:

  • [linter-luacheck]: [Luacheck] integration
Jerakin /
Last active Jul 9, 2018
For building and deploying Defold projects directly to your phone
Builder is built by wrapping adb and storing some data locally
I would recommend to add an alias to your ~.bash_profile to use it easier
alias builder="python3.5 ~/Documents/repo/builder/"
Usage: [command] [arguments]
Available Commands:
build build [location of a project]
install install [path to APK]
uninstall uninstall [bundle id]
mathiaswking /
Last active Jun 18, 2019
Deploys an .apk to the USB connected Android device. Starts the app, and grabs the logging events for that PID
#!/usr/bin/env bash
#set -e
if [ -z "$PACKAGE" ]; then
echo "You must pass a .apk as input!"
exit 1
britzl /
Last active Dec 10, 2020
Script to build and bundle a Defold project for multiple platforms
title=$(less game.project | grep "^title = " | cut -d "=" -f2 | sed -e 's/^[[:space:]]*//')
title_no_space=$(echo -e "${title}" | tr -d '[[:space:]]')
echo "Project: ${title}"
if [ ! -f bob.jar ]
echo "Unable to find bob.jar. Download it from"
exit 1
JCash /
Created Jul 17, 2016
A quick way to convert Defold video (.ivf) into a compressed .gif
#!/usr/bin/env bash
t0chas / CustomEditorBase.cs
Last active Aug 5, 2022
Default Custom Inspector-Editor for Unity3D with ReorderableLists for arrays handling
View CustomEditorBase.cs
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System.Collections.Generic;
using UnityEditor.AnimatedValues;
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)]
public class CustomEditorBase : Editor

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++?