Skip to content

Instantly share code, notes, and snippets.

View artyomtrityak's full-sized avatar
:octocat:
Alloha

Artem Trytiak artyomtrityak

:octocat:
Alloha
View GitHub Profile
// START A3HEADER
//
// This source file is part of the Atlantis PBM game program.
// Copyright (C) 1995-1999 Geoff Dunbar
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// START A3HEADER
//
// This source file is part of the Atlantis PBM game program.
// Copyright (C) 1995-1999 Geoff Dunbar
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
Orc Scout (4841) attacks Stark House Guard (2633) in hill (34,32) in
Schyacher!
Attackers:
Orc Scout (4841), Horde (17), behind, hobgoblin [HGOB].
Defenders:
Court Jesters (904), The Kingdom of the North (7), behind, 11 orcs
[ORC], 11 goblins [GBLN].
Farmers (1413), The Kingdom of the North (7), behind, 13 orcs [ORC].
[ALIASES]
armorer = ARMO
AXE = AXE
BAG = BAG
BOW = BOW
building = BUIL
camel_training = CAME
combat = COMB
[ALIASES]
armorer = ARMO
AXE = AXE
BAG = BAG
BOW = BOW
building = BUIL
combat = COMB
cotton = COTT
@artyomtrityak
artyomtrityak / react-hooks-typescript.tsx
Last active February 7, 2019 19:42
React Hooks custom hook use typescript
enum DROPDOWNS {
REPORT = "REPORT",
USER = "USER"
}
type IDropdowns = keyof typeof DROPDOWNS | null;
type IUseDropdown = [
RefObject<HTMLInputElement>,
IDropdowns,
@artyomtrityak
artyomtrityak / dropdown-hooks.tsx
Last active February 7, 2019 20:30
React hooks window addEventListener local variables
import React, { useState, useRef, useEffect, RefObject } from "react";
enum DROPDOWNS {
REPORT = "REPORT",
USER = "USER"
}
type IDropdowns = keyof typeof DROPDOWNS | null;
type IUseDropdown = [
import { until } from "selenium-webdriver";
import {
queryElement,
projectSelect,
waitForElementRemoval,
clickWhenAble,
sendKeysWhenAble,
page
} from "../../utils/helpers";
@artyomtrityak
artyomtrityak / d3-with-size.js
Last active July 22, 2018 09:47
React HOC for D3js to pass width / height to React
import ReactDOM from "react-dom";
import React from "react";
import _ from "lodash";
// --------------------------------
// With width / hegit HOC for D3.js
// --------------------------------
const WithSize = Child =>
class extends React.Component {