Skip to content

Instantly share code, notes, and snippets.

C:\Steam\steamapps\common\XCOM 2 War of the Chosen SDK\Binaries\Win64>XComGame.com CookPackages -platform=pcconsole -quickanddirty -modcook -sha -multilanguagecook=INT+FRA+ITA+DEU+RUS+POL+KOR+ESN -singlethread -nopause
Log: Executing Class UnrealEd.CookPackagesCommandlet
LoadAnIniFile was unable to find FilenameToLoad: C:\Steam\steamapps\common\XCOM 2 War of the Chosen SDK\Binaries\Win64\..\..\XComGame\Config\DefaultPlaylist.ini
LoadAnIniFile was unable to find FilenameToLoad: C:\Steam\steamapps\common\XCOM 2 War of the Chosen SDK\Binaries\Win64\..\..\XComGame\Config\XComPlaylist.ini
LoadAnIniFile was unable to find FilenameToLoad: C:\Steam\steamapps\common\XCOM 2 War of the Chosen SDK\Binaries\Win64\..\..\XComGame\Config\DefaultWeb.ini
LoadAnIniFile was unable to find FilenameToLoad: C:\Steam\steamapps\common\XCOM 2 War of the Chosen SDK\Binaries\Win64\..\..\XComGame\Config\XComWeb.ini
Cooking with SEPARATE Lighting TextureFileCache...
Cooking with SEPARATE Character TextureFileCache...
**** Multilanguage C
@Xymanek
Xymanek / TestPendingStateLeak.uc
Created November 22, 2020 07:41
TestPendingStateLeak
exec function TestPendingStateLeak ()
{
local XComGameState_HeadquartersAlien AlienHQ;
local XComGameStateHistory History;
local XComGameState NewGameState;
History = `XCOMHISTORY;
AlienHQ = XComGameState_HeadquartersAlien(History.GetSingleGameStateObjectForClass(class'XComGameState_HeadquartersAlien'));
`CI_Log(`showvar(AlienHQ.bChosenActive) @ "(from history without pending)");
UnitRandomizedStats
OverrideClipSize
OverrideRandomizeAppearance
OverrideHasHeavyWeapon
OverrideItemMinEquipped
OverrideHasGrenadePocket
NewCrewNotification
UnitRankUp
OverrideAddChosenTacticalTagsToMission
OverrideScienceScore
// NOTE: need the eTeam_DONT_USE_X because the enum values are used as bitfields in C++ -tsmith
enum ETeam
{
eTeam_None, // = 0
eTeam_Neutral, // = 1
eTeam_One, // = 2
eTeam_DONT_USE_3,
eTeam_Two, // = 4
eTeam_DONT_USE_5,
eTeam_DONT_USE_6,
jQuery.Deferred exception: too much recursion toType@http://localhost:5000/Scripts/jquery-3.3.1.js:122:15
isArrayLike@http://localhost:5000/Scripts/jquery-3.3.1.js:490:10
makeArray@http://localhost:5000/Scripts/jquery-3.3.1.js:381:9
jQuery.fn.init@http://localhost:5000/Scripts/jquery-3.3.1.js:3007:10
jQuery@http://localhost:5000/Scripts/jquery-3.3.1.js:139:10
k@https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/js/tempusdominus-bootstrap-4.min.js:6:29109
@https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/js/tempusdominus-bootstrap-4.min.js:7:23475
dispatch@http://localhost:5000/Scripts/jquery-3.3.1.js:5182:16
add/elemData.handle@http://localhost:5000/Scripts/jquery-3.3.1.js:4991:6
trigger@http://localhost:5000/Scripts/jquery-3.3.1.js:8249:5
@Xymanek
Xymanek / AbstractFormAction.php
Last active March 15, 2018 19:00
Sonata admin custom form action RFC
<?php
declare(strict_types=1);
namespace App\Admin\FormAction;
use Sonata\AdminBundle\Admin\AdminInterface;
abstract class AbstractFormAction implements FormActionInterface, AdminAwareInterface
{
/**
@Xymanek
Xymanek / Readme.md
Last active February 17, 2022 13:52
UniqueDto validator

It can

  • properly deal with multi-fields uniqueness checks (and composite PKs)
  • use symfony's property path or directly private properties
  • does not cause hydration when checking
  • allows to optionally map to existing entity (by having it as property) or by mapping id fields (or none at all so any matching record will trigger a failure)
  • allows to re-map fields between DTO and entity (eg. fields={"display_name": "username"}). Combined with sf property accessor this allows for "virtual properties". This also works for id fields
  • load the violating record to show in debug panel. Example http://prntscr.com/i3ifbn
  • not get confused if multiple violating records are found
@Xymanek
Xymanek / DataConnectionWrapper.php
Created August 23, 2017 08:17
Symfony multi-tenant database
<?php
namespace AppBundle\Doctrine;
use AppBundle\Entity\Organisation;
use Doctrine\DBAL\Connection;
use Acme\Common\DatabaseNameResolver;
class DataConnectionWrapper extends Connection
{
/**
------------------------ FOLDER "FACEBASE" ------------------------
Volume in drive E is SOFT
Volume Serial Number is A02B-91EB
Directory of E:\Software\machine\python\facebase
15-Jul-16 20:16 <DIR> .
15-Jul-16 20:16 <DIR> ..
15-Jul-16 10:52 <DIR> 0
15-Jul-16 11:03 <DIR> 1
<?php
// \App\Model\Table\PollAnswersTable
public function countVotes ($id)
{
/** @var \App\Model\Entity\Poll $poll */
$poll = $this->get($id, ['contain' => 'PollAnswers']);
// Some logic here, it's irrerevant
// Calculate the score