Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey Gulev AGulev

View GitHub Profile
@AGulev
AGulev / DrawState.hx
Last active Aug 29, 2015
HaxeFlixel state в котором реализовано простое рисование с физикой. Русские комментарии. http://agulev.com/risovanie-s-fizikoj-na-haxeflixel/
View DrawState.hx
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;
View HaxeReinstall
#!/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 Apr 3, 2016 — forked from t0chas/CustomEditorBase.cs
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)]
[CanEditMultipleObjects]
public class CustomEditorBase : Editor
{
@AGulev
AGulev / swipe.lua
Last active Oct 14, 2019
adoptation of swipe-direction script by ScottPhillips https://github.com/ScottPhillips/swipe-direction/blob/master/swipe-direction.lua for Defold engine
View swipe.lua
local beginX
local beginY
local endX
local endY
local startTime
local xDistance
local yDistance
@AGulev
AGulev / swipe_mouse.lua
Created Jul 29, 2016
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
View swipe_mouse.lua
local beginX
local beginY
local endX
local endY
local startTime = 0
local xDistance
local yDistance
View .luacheckrc
std = "max"
files['.luacheckrc'].global = false
unused_args = false
globals = {
"sys",
"go",
"gui",
"label",
"render",
@AGulev
AGulev / bundle.sh
Last active May 16, 2018 — forked from britzl/bundle.sh
Script to build and bundle a Defold project for multiple platforms
View bundle.sh
#!/bin/bash
readonly java_path='java'
readonly output_path='build'
readonly email='my@email.com'
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 Mar 8, 2018
Python script for removing unused PNG files from the Defold project
View remove_unused_png.py
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 Mar 8, 2018
Python script for removing duplicates in flipbook animation in Defold project
View remove_duplicates_in_flipbook.py
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 Mar 29, 2020
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)
View duplicates_finder.py
# 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:
You can’t perform that action at this time.