Skip to content

Instantly share code, notes, and snippets.

View CrackerJackMack's full-sized avatar

Kevin Landreth CrackerJackMack

View GitHub Profile
@CrackerJackMack
CrackerJackMack / README.md
Last active October 28, 2024 15:57
Linux steam proton multiplayer desync script

I wanted to play Sins of the solar Empire 2 with my friends. Proton and Lutris works great for SP, but MP was broke.

First blocker was forcing the CPU architecture: (you can also edit this via ctrl+shift+s while in game)

The second was that there were desync issues, which the community found and fixed for other games. These desync issues seem to be fairly common with multiplayer games using proton. So you can always try this and copy the backup files back (.bak) if it didn't work. This version adds sha256 checksums of the .exe files. If you run into issues with "command not found", try dos2unix steam_patch_mp_desync.sh then retry.

The below script is a more agnostic version of the original script to be more generic and work with most games b

$ git co works-bug-ugly 
Switched to branch 'works-bug-ugly'
Your branch is up-to-date with 'origin/works-bug-ugly'.
[kevin,bassle]<0>[python-pip-source-1,works-bug-ugly*]~/devel/python-pip-source-1
$ pip install .
Processing /home/kevin/devel/python-pip-source-1
Collecting libtestpip (from testpip-1==0.0.1)
  Could not find a version that satisfies the requirement libtestpip (from testpip-1==0.0.1) (from versions: )
No matching distribution found for libtestpip (from testpip-1==0.0.1)
$ pip install -v 'git+https://github.com/CrackerJackMack/python-pip-source-1.git@master#egg=testpip_1'
Collecting testpip_1 from git+https://github.com/CrackerJackMack/python-pip-source-1.git@master#egg=testpip_1
  Cloning https://github.com/CrackerJackMack/python-pip-source-1.git (to master) to /tmp/pip-build-umBtmi/testpip-1
  Running command git clone -q https://github.com/CrackerJackMack/python-pip-source-1.git /tmp/pip-build-umBtmi/testpip-1
  Running command git show-ref
  cb3008fb845eb7b40537ab24ee6866c99d28a5a5 refs/heads/master
  cb3008fb845eb7b40537ab24ee6866c99d28a5a5 refs/remotes/origin/HEAD
  cb3008fb845eb7b40537ab24ee6866c99d28a5a5 refs/remotes/origin/master
  cb3008fb845eb7b40537ab24ee6866c99d28a5a5 refs/tags/v0.0.1
[kevin,bassle]<0>[testinstall_2,master*]~/devel/python-pip-source-1                                                                                                                                                                           
$ pip install -vr requirements.txt                                                                                                                                                                                                            
Collecting libtestpip from git+ssh://[email protected]/crackerjackmack/python-pip-source-2@master#egg=libtestpip (from -r requirements.txt (line 1))                                                                                             
  Cloning ssh://[email protected]/crackerjackmack/python-pip-source-2 (to master) to /tmp/pip-build-KSDqlt/libtestpip                                                                                                                            
  Running command git clone -q ssh://[email protected]/crackerjackm
[kevin,bassle]<0>[testinstall_1,master*]~/devel/python-pip-source-1
$ pip install -v .
Processing /home/kevin/devel/python-pip-source-1
  Running setup.py (path:/tmp/pip-LhdiNp-build/setup.py) egg_info for package from file:///home/kevin/devel/python-pip-source-1
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/testpip_1.egg-info
    writing requirements to pip-egg-info/testpip_1.egg-info/requires.txt
    writing pip-egg-info/testpip_1.egg-info/PKG-INFO
[INFO ] Running state [/opt/wkhtmltopdf] at time 08:33:55.587328
[INFO ] Executing state file.directory for [/opt/wkhtmltopdf]
[INFO ] Directory /opt/wkhtmltopdf is in the correct state
Directory /opt/wkhtmltopdf updated
[INFO ] Completed state [/opt/wkhtmltopdf] at time 08:33:55.589224 duration_in_ms=1.897
[DEBUG ] LazyLoaded archive.extracted
[INFO ] Running state [/opt/wkhtmltopdf] at time 08:33:55.592188
[INFO ] Executing state archive.extracted for [/opt/wkhtmltopdf]
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'minion', 'tcp://192.168.37.10:4506', 'aes')
[DEBUG ] Initializing new AsyncAuth for ('/etc/salt/pki/minion
@CrackerJackMack
CrackerJackMack / 01_README.md
Created June 4, 2017 05:33
systemd # workaround

This is my take on a systemd#2741 work-around. The lack of native namespace joining makes it so you have to do a dance with systemd's version of private namespaces and iproute2's version. The portal_network.sh is my rendition of iproute2.
Credit to ian-kelling's code and comment in the systemd issue that inspired me to research this further. Looking at iproute2's source the bash script should be identical, including the private mount and bind mounts. This level of compatibility gives the administrator the ability to use ip -n portal ... for any subsequent commands.

Files are dash separated due to this being a gist (slashes aren't allowed). PLace the files in the correct locations then run the following:

  1. systemctl enable portal.target portal.network.service whatever.service
  2. systemctl restart systemd-networkd # if using the vlan files and such
@CrackerJackMack
CrackerJackMack / 00_README.md
Last active September 6, 2022 22:34
ansible fact caching redis password different port

Everything I've read is that redis fact caching in ansible doesn't support db/password/ports, but that is untrue. It's undocumented and it will most likely change in the future but here is how it works. it takes the fact_caching_connection and split's it on the colon and passes it as *args to redis.StrictRedis. Db is typically 0 if you weren't sure. If you aren't sure if the ansible version you are using supports this, just check the plugins/redis.py for how it passes the connection string to StrictRedis. Works with 2.2.0.0 at least.

# hostname:port:db:password
localhost:6379:0:secret
public_ip:293451:0:supersercretnobodycanguessthis
cvs diff: Diffing .
Index: llnw.net
===================================================================
RCS file: /local/cvs/pri/llnw.net,v
retrieving revision 1.4994
diff -u -r1.4994 llnw.net
--- llnw.net 5 Jun 2015 00:21:51 -0000 1.4994
+++ llnw.net 5 Jun 2015 19:06:50 -0000
@@ -1622,7 +1622,8 @@
; Development Storm service point
!
router ospf
area 0
timers throttle spf 5000 10000 20000
distance external 125
distance inter 125
distance intra 125
!
router isis
net 10.10.10.10.10