Skip to content

Instantly share code, notes, and snippets.

View SelStrom's full-sized avatar

Andrey Shatalov SelStrom

  • Russian Federation
View GitHub Profile
@SelStrom
SelStrom / main
Last active August 15, 2021 21:01
parallel process on awake
using System;
using System.Threading;
using System.Threading.Tasks;
namespace AwaitExperiments
{
class Program
{
private static CancellationTokenSource _tokenSource;
private static int _i;
package
{
import flash.utils.Dictionary;
/**
* Управление вызовом асинхронных функйии.
* Позволяет выполнять функции последовательно, паралельно и в режиме водопада.
* @author Andrey Shatalov
*/
public class ControllFlow
Replasing standart types;
//(uint)|(\Wint)|(Number)|(boolean)|(protected)
//$1$2$3$4$5
uint
UInt
int
Int
@SelStrom
SelStrom / allpng2fullatf.bat
Created September 24, 2016 19:17
Converts the all *.png files in the folder in to atf
@echo off
if exist atf_assets (
echo:Delete the folder atf_assets and all its contents?
rd /s atf_assets
)
mkdir atf_assets
for %%A in (*.png) do (
rem echo:%%~fA
png2atf -c p -r -i %%A -o atf_assets/%%~nA_pvrtc.atf
png2atf -c e -r -i %%A -o atf_assets/%%~nA_etc1.atf
@SelStrom
SelStrom / commands
Last active September 16, 2016 16:29
Regular expressions for converting a .fnt file in to .xml
fist line: <reg exp>
second lines : <
code
for
replasing
>
(?<!\.)(-?\d+(?:,?-?\d+)*)(?! Semi)(?!\.)
"$1"
@SelStrom
SelStrom / Application.as
Created August 29, 2016 15:59
Feathers dev 3.1 bug viewing
package {
import feathers.controls.AutoSizeMode;
import feathers.controls.Button;
import feathers.controls.Label;
import feathers.controls.LayoutGroup;
import feathers.controls.text.BitmapFontTextRenderer;
import feathers.layout.AnchorLayout;
import feathers.layout.AnchorLayoutData;
import feathers.layout.HorizontalAlign;
import feathers.layout.VerticalAlign;
@SelStrom
SelStrom / db_copy.sh
Created August 18, 2016 18:03
Scripts to copy castom db to remote server
#!/bin/bash
#set -x
/etc/init.d/mysql stop
cp -R /var/lib/mysql/$1 /home/backup/ #copy /home/backup/ reqursively
cd /home/backup/
tar -zcvf $1.tar.gz $1 #archive this
scp $1.tar.gz <user>@<host>:/home/$1.tar.gz //like root@XXX.xxx.xxx.xxx
#dont forget to set unix-style line endings
package {
import away3d.cameras.Camera3D;
import away3d.controllers.HoverController;
import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.ui.Keyboard;
package {
import away3d.containers.ObjectContainer3D;
import away3d.containers.View3D;
import away3d.core.managers.Stage3DManager;
import away3d.core.managers.Stage3DProxy;
import away3d.debug.AwayStats;
import away3d.entities.Mesh;
import away3d.events.Stage3DEvent;
import away3d.materials.TextureMaterial;
import away3d.primitives.PlaneGeometry;