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 / 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
{
@AGulev
AGulev / swipe.lua
Last active November 22, 2021 15:54
adoptation of swipe-direction script by ScottPhillips https://github.com/ScottPhillips/swipe-direction/blob/master/swipe-direction.lua for Defold engine
local beginX
local beginY
local endX
local endY
local startTime
local xDistance
local yDistance
@AGulev
AGulev / swipe_mouse.lua
Created July 29, 2016 06:25
adoptation of swipe-direction script by ScottPhillips https://github.com/ScottPhillips/swipe-direction/blob/master/swipe-direction.lua for Defold engine using mouse_trigger instead touch_trigger
local beginX
local beginY
local endX
local endY
local startTime = 0
local xDistance
local yDistance
std = "max"
files['.luacheckrc'].global = false
unused_args = false
globals = {
"sys",
"go",
"gui",
"label",
"render",
@AGulev
AGulev / bundle.sh
Last active December 10, 2020 13:45 — forked from britzl/bundle.sh
Script to build and bundle a Defold project for multiple platforms
#!/bin/bash
readonly java_path='java'
readonly output_path='build'
readonly email='[email protected]'
readonly auth_key='my_key'
readonly texture_compresstion='false'
readonly andr_key_path='key.pk8'
readonly andr_cert_path='certificate.pem'
@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 / 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 / duplicates_finder.py
Last active April 26, 2024 02:32
Python script for a searching duplicate files in folder. Modification of: https://www.pythoncentral.io/finding-duplicate-files-with-python/ (file size counter was added)
# dupFinder.py
import os, sys, stat
import hashlib
def findDup(parentFolder):
# Dups in format {hash:[names]}
dups = {}
for dirName, subdirs, fileList in os.walk(parentFolder):
print('Scanning %s...' % dirName)
for filename in fileList: