Skip to content

Instantly share code, notes, and snippets.

@AGulev
AGulev / DrawState.hx
Last active August 29, 2015 14:14
HaxeFlixel state в котором реализовано простое рисование с физикой. Русские комментарии. http://agulev.com/risovanie-s-fizikoj-na-haxeflixel/
import flixel.addons.nape.FlxNapeSprite;
import flixel.addons.nape.FlxNapeState;
import flixel.FlxCamera;
import flixel.FlxG;
import flixel.ui.FlxButton;
import flixel.util.FlxColor;
import flixel.util.FlxMath;
import flixel.util.FlxPoint;
import flixel.util.FlxSpriteUtil;
import Math;
#!/bin/sh
set -e
rm -rf /usr/local/bin/neko
rm -rf /usr/local/bin/nekoc
rm -rf /usr/local/lib/neko
rm -rf /usr/local/lib/libneko.dylib
rm -rf /usr/local/bin/haxe
rm -rf /usr/local/bin/nekotools
rm -rf /usr/local/bin/haxelib
@AGulev
AGulev / remove_duplicates_in_flipbook.py
Last active March 8, 2018 18:37
Python script for removing duplicates in flipbook animation in Defold project
import os, sys, hashlib
import deftree
def all_files(ending):
# Generator to get files
for root, folders, files in os.walk(project_root):
for f in files:
if f.endswith(ending):
yield os.path.join(root, f)
@AGulev
AGulev / remove_unused_png.py
Last active March 8, 2018 19:24
Python script for removing unused PNG files from the Defold project
import os, sys, hashlib, stat
import deftree, configparser
PROJECT_FILE = "game.project"
def all_files(ending):
# Generator to get files
for root, folders, files in os.walk(project_root):
for f in files:
if f.endswith(ending):
@AGulev
AGulev / delete_duplicate_sprites_in_atlases.py
Last active March 8, 2018 19:28
Python script for removing multi-adding same sprites to the non animated atlas in Defold project
import os, sys, hashlib
import deftree
def all_files(ending, project_root):
# Generator to get files
for root, folders, files in os.walk(project_root):
for f in files:
if f.endswith(ending):
yield os.path.join(root, f)
@AGulev
AGulev / FBInstant.d.ts
Created March 15, 2018 14:51
Type definitions for FBInstant v2.1 (deprecated)
// Type definitions for FBInstant v2.1
// Api documentation : https://developers.facebook.com/docs/games/fbinstant-api
//
/**
* Top level namespace for the Instant Games SDK.
*/
declare var FBInstant:fbinstant.IFBInstant;
declare namespace fbinstant
{
@AGulev
AGulev / style-guide.md
Created April 27, 2018 16:11 — forked from dapetcu21/style-guide.md
Interrogation Style Guide

Lua style guide

Linting

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
@AGulev
AGulev / builder.py
Created April 28, 2018 10:49 — forked from Jerakin/builder.py
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/builder.py"
Usage:
builder.py [command] [arguments]
Available Commands:
@AGulev
AGulev / CustomEditorBase.cs
Created April 3, 2016 17:15 — forked from t0chas/CustomEditorBase.cs
Default Custom Inspector-Editor for Unity3D with ReorderableLists for arrays handling
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System.Collections.Generic;
using UnityEditor.AnimatedValues;
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)]
[CanEditMultipleObjects]
public class CustomEditorBase : Editor
{
std = "max"
files['.luacheckrc'].global = false
unused_args = false
globals = {
"sys",
"go",
"gui",
"label",
"render",