Skip to content

Instantly share code, notes, and snippets.

Add-Type -As System.IO.Compression.FileSystem;
# %USERPROFILE%\Documents\Paradox Interactive\Stellaris\save games
$savePath = "$($env:USERPROFILE)\Documents\Paradox Interactive\Stellaris\save games"
echo $savePath;
echo 'Star position x axis goes from left to right, y axis goes from top to bottom, -- is thus at top right corner while ++ at bottm left'
echo 'star positions are in -200 to +200 ranges'
echo '28 pops => space age'
echo '22 pops => machine age'
namespace Blah
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Preparing Thing");
var thing = GCAbuse();
//make GC run now instead of waiting for memory pressure this tiny program will never generate
@PTwr
PTwr / disableinternal.sh
Last active August 29, 2023 22:43
Tinkering with multi monitor on steamdeck
xrandr --output eDP --off # disable internal screen if you want better FPS in game
@PTwr
PTwr / Test_Submodule.py
Created July 26, 2021 19:23
accesstokensniffer based on client.gui.shop.getShopProductInfo
import logging
from items import vehicles, tankmen, EQUIPMENT_TYPES, ItemsPrices
import os
from ConfigParser import ConfigParser
import BigWorld
from helpers import getFullClientVersion, getShortClientVersion, getClientVersion
import importlib
import ResMgr
import string
@PTwr
PTwr / Vanillifer.ini
Created July 21, 2021 18:52
Vanillifer - remove only dogtags
[dogtags]
disable = true
@PTwr
PTwr / progression.xml
Created July 20, 2021 10:49
sCrew 2.1 Sandbox scripts\item_defs\crew2\detachments\progression.xml decrypted
<progression.xml>
<xsi>http://www.w3.org/2001/XMLSchema-instance</xsi>
<noNamespaceSchemaLocation>../../../development/xml_schema/crew2/detachment/progression.xsd</noNamespaceSchemaLocation>
<progression>
<layout>
<id>1</id>
<priceGroupID>1</priceGroupID>
<badgeID>200</badgeID>
<levels>
<level>
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem')
foreach($sourceFile in (Get-ChildItem -filter 'vehicles_level_*.pkg'))
{
foreach($entry in [IO.Compression.ZipFile]::OpenRead($sourceFile.FullName).Entries | select-string "vehicles\/(american|british|chinese|czech|french|german|japan|poland|russian|sweden)\/([a-zA-Z]*[0-9]*_[^\/]*)\/$")
{
"$entry $sourceFile"
}
}
@PTwr
PTwr / rename replays.ps1
Last active December 6, 2020 21:15
Powershell script to batch-rename World Of Tanks replays
#change path if you store replays in different place, or just navigate manually
cd C:\games\World_of_Tanks\replays
#regex to snatch stuff from filename
$splitfilename = '(?<date>[0-9]+)_(?<time>[0-9]+)_(?<=_)(?<nation>.*?)(?=-)-(?<=-)(?<tankcode>.*?)(?=_)_(?<=_)(?<tankname>.*?)(?=_(?<mapid>[0-9]+)(?!.*[0-9]))_[0-9]+_(?<mapname>.*)\.wotreplay$'
foreach ($replay in Dir *.wotreplay)
{
$parts = $replay.Name -match $splitfilename
[Adblock Plus 2.0]
! Version:
! Title: WorlOfTanks forum filters
! Last modified: 06.12.2020
! Expires: 7 days (update frequency)
! Homepage:
!
forum.worldoftanks.com##div.post_body div.signature img
forum.worldoftanks.com#?#div[id^="index_stats"] li.clearfix:-abp-has(a.url.name span[itemprop^="name"]:-abp-contains(Whistling_Death_))
forum.worldoftanks.com#?#table.topic_list tr[itemscope]:-abp-has(a[hovercard-ref^="member"] span[itemprop^="name"]:-abp-contains(Whistling_Death_))
@PTwr
PTwr / blah.css
Last active January 3, 2020 22:04
force image into drilldown chart description
span.highcharts-drilldown-axis-label:nth-child(1)::before {
content: '';
height: 24px;
width: 24px;
background: url(assets/images/nations/ussr.png);
display: block;
background-size: contain;
}
span.highcharts-drilldown-axis-label:nth-child(2)::before {
content: '';