Skip to content

Instantly share code, notes, and snippets.

View Leopotam's full-sized avatar
🇷🇺

Leopotam Leopotam

🇷🇺
View GitHub Profile
@Leopotam
Leopotam / fix_voltage.sh
Created December 8, 2022 00:43 — forked from darkxanter/fix_voltage.sh
orange pi pc fix voltage
#!/bin/bash
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
if [ "$(id -u)" != "0" ]; then
echo "This script must be executed as root. Exiting" >&2
exit 1
fi
apt-get install git pkg-config libusb-dev libusb-1.0-0-dev build-essential
// startup.
sealed class BattleStartup : MonoBehaviour {
EcsWorld _world;
EcsSystems _systems;
void Start () {
_world = new EcsWorld ();
_systems = new EcsSystems (_world);
_systems
.Add (new TimeSystem ())
@Leopotam
Leopotam / UnityShaderFFS.md
Created April 4, 2019 15:13 — forked from smkplus/UnityShaderCheatSheet.md
Controlling fixed function states from materials/scripts in Unity

16999105_467532653370479_4085466863356780898_n

Shader "MaterialPropertyDrawer"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
 
[HideInInspector] _MainTex2("Hide Texture", 2D) = "white" {}
using System;
using UnityEngine;
namespace Client.Common {
sealed class PrefabPool<T> : IDisposable where T : Component {
T[] _items = new T[8];
int _itemsCount;
T _prefab;
using UnityEngine;
namespace Leopotam.Ecs.Tests {
#if !LEOECS_DISABLE_INJECT
[EcsInject]
#endif
public class Test1 : MonoBehaviour, IEcsInitSystem {
EcsWorld _world;
class C1_1 {
@Leopotam
Leopotam / workers.md
Created February 22, 2018 19:38
host-tracker.com fails
host code ip time size speed hoster
New York, NY, United States 200(OK) XX.XX.XX.XX (2 ms, 1130 ms, 139 ms) 1271 ms 25998 20.01 kB/s XZN Hosting
Quincy, WA, United States 200(OK) XX.XX.XX.XX (2 ms, 1432 ms, 217 ms) 1651 ms 25998 15.40 kB/s SiteSecure
Dusseldorf, Germany 200(OK) XX.XX.XX.XX (1 ms, 1567 ms, 69 ms) 1637 ms 25998 15.52 kB/s Amhost.net web hosting
Los Angeles, CA, United States 200(OK) XX.XX.XX.XX (40 ms, 1967 ms, 216 ms) 2223 ms 25998 11.63 kB/s Premium Reseller
Amsterdam, Netherlands 200(OK) XX.XX.XX.XX (0 ms, 1184 ms, 101 ms) 1285 ms 25998 19.76 kB/s SiteSecure
London, United Kingdom 200(OK) XX.XX.XX.XX (0 ms, 1186 ms, 76 ms) 1262 ms 25998 20.12 kB/s SiteSecure
Amsterdam, Netherlands 200(OK) XX.XX.XX.XX (0 ms, 1100 ms, 59 ms) 1159 ms 25998 21.91 kB/s HZ Hosting LTD
Santa Fe de la Vera Cruz, Argentina 200(OK) XX.XX.XX.XX (2 ms, 4450 ms, 296 ms) 4748 ms 25998 5.35 kB/s HostTracker DW
using System.Collections.Generic;
using LeopotamGroup.Ecs.Ui.Components;
using UnityEngine;
namespace LeopotamGroup.Ecs.Ui.Tests {
public class TestUiScrollViewEventSystem : EcsReactSystem {
[EcsWorld]
EcsWorld _world;
[EcsFilterInclude (typeof (EcsUiScrollViewEvent))]
using LeopotamGroup.Ecs.Ui.Components;
using UnityEngine;
namespace LeopotamGroup.Ecs.Ui.Tests {
public class TestUiInputEventSystem : IEcsRunSystem {
[EcsWorld]
EcsWorld _world;
[EcsFilterInclude (typeof (EcsUiInputChangeEvent))]
EcsFilter _inputChangeEvents;
using LeopotamGroup.Ecs.Ui.Components;
using UnityEngine;
namespace LeopotamGroup.Ecs.Ui.Tests {
public class TestUiEnterExitEventSystem : IEcsRunSystem {
[EcsWorld]
EcsWorld _world;
[EcsFilterInclude (typeof (EcsUiEnterEvent))]
EcsFilter _enterEvents;
using LeopotamGroup.Ecs.Ui.Components;
using UnityEngine;
namespace LeopotamGroup.Ecs.Ui.Tests {
public class TestUiDragEventSystem : IEcsRunSystem {
[EcsWorld]
EcsWorld _world;
[EcsFilterInclude (typeof (EcsUiBeginDragEvent))]
EcsFilter _beginDragEvents;