Skip to content

Instantly share code, notes, and snippets.

@JPLeBreton
JPLeBreton / colorblox.py
Last active April 5, 2024 19:38
colorblox.py - converts given image into emoji color blocks
import sys, os
from PIL import Image
MAX_SIZE = 16 # max output dimension in characters
RESAMPLE_TYPE = Image.NEAREST # alternately, Image.BICUBIC
DITHER_TYPE = Image.NONE # alternately, Image.FLOYDSTEINBERG
TRANSP = (0, 0, 0, 0)
@JPLeBreton
JPLeBreton / nms_next_community_missions.txt
Created May 25, 2020 18:21
No Man's Sky Historical Record - NEXT era community research mission locations
/ start date / system / coordinates / mission / planet
-----------------------------------------------------------------------------
Week 1 / 2018-08-30 / Keituhype / 084E:009D:07F8:003B / Dig / Oezen Gamma
Week 2 / 2018-09-06 / Achepzi / 0BC6:005E:0D19:00C3 / Feed / Kathaxt Major
Week 3 / 2018-09-20 / Godars / 0497:00F6:0AB6:0063 / Kill / Suzu 25/G7
Week 4 / 2018-09-27 / Oitsaha / 010F:007F:0925:01DF / Boundaries / Etch VIII
Week 5 / 2018-10-12 / Inkixig-Garac / 0A61:00CF:0AB8:017A / Find / Elorence E28
Week 6 / 2018-10-19 / Lusalkai / 0E35:0087:0AD2:00FA / Relive / Rikasu XIII
Week 7 / 2018-11-02 / Volandro / 0022:00A2:09C0:00B8 / Picture / Kofu 31/J2
Week 8 / 2018-11-22 / Hekhac-Kikar / 00FE:007D:0851:01FB / Scan Flora / Nitan III
@JPLeBreton
JPLeBreton / gist:ee0a1a2816fbca923889fd4c06a32346
Last active June 8, 2019 16:30
Update on GZDoom client/server branch from Rachael on ZDoom Discord
So I see it getting asked a lot, the state of the client/server branch.
Unfortunately there are no new "updates" on it, but it is not abandoned. The
idea is very much alive and there's still interest in it (personally, I
believe it is a vital part of modernizing GZDoom's core, and not just for
multiplayer purposes).
However, obviously, there have not been any updates on it in a while. We've
had other things to do, other projects, this is just on the back burner for
now. There's a lot going on with GZDoom right now and this just doesn't rank
very high on the priority list. We'll get there - eventually.
@JPLeBreton
JPLeBreton / fishing.zsc
Created March 5, 2018 05:06
Fishing Rod (multi-phase fire state weapon)
class MFFishingRod : Weapon
{
States
{
Spawn:
SAWG C -1;
Stop;
Ready:
@JPLeBreton
JPLeBreton / playscii_pi3_crash.log
Created January 2, 2018 06:27
playscii raspberry pi3 PyOpenGL crash
pi@emulord:~/playscii $ python3 playscii.py
Playscii v0.9.9
Loading config from /home/pi/.config/Playscii/playscii.cfg...
Config loaded.
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
Detecting hardware...
CPU: armv7l
OS: Linux-4.9.35-v7+-armv7l-with-debian-8.0
@JPLeBreton
JPLeBreton / wadbot3_log.txt
Created August 7, 2017 06:01
wadbot3 level index dump
This file has been truncated, but you can view the full file.
WADBOT v3
=========
Updating level index...
13585 new ZIP files indexed
41467 new levels indexed in 611.6325542926788 seconds
Level list:
combos/alangnsx.zip | altaunts.WAD | MAP84
combos/alangnsx.zip | alandogunx.WAD | MAP84
combos/alangnsx.zip | alandogunx.WAD | TITLEMAP
combos/alangnsx.zip | reallight.WAD | MAP87
@JPLeBreton
JPLeBreton / wadls.py
Last active March 7, 2021 23:53
wadls - list all map files within a WAD/PK3/ZIP
#!/usr/bin/python
import os, sys, zipfile, tempfile
# wadls (pronounced "waddles", thx joshthenesnerd) - list all maps in a wad/zip/pk3
# requires omgifol module, set path to it here or in env variable
OMG_PATH = os.environ.get('OMG_PATH', None) or '/home/jpl/projects/wadsmoosh'
sys.path.append(OMG_PATH)
import omg
@JPLeBreton
JPLeBreton / binds.cfg
Created August 8, 2016 20:42
Photoshop-style keybinds for Playscii
# user keybinds file
# accepted modifiers: ctrl, alt, shift
# keys must be equivalent to output of sdl2.SDL_GetKeyName(),
# eg return, tab, backspace
self.edit_bind_src = {
'ctrl q' : 'quit',
'`' : 'toggle_console',
'ctrl m' : 'convert_image',
'ctrl e' : ('export_image', 'edit_art_for_selected_objects'),
@JPLeBreton
JPLeBreton / rot_n.py
Last active October 17, 2015 20:15
ROT-N variable-offset substitution encipher for Python3 (to decipher, enter negative offset)
from string import ascii_lowercase
def rot_n(in_string, n=13):
"returns copy of in_string shifted alphabetically by given offset N"
n %= len(ascii_lowercase)
char_shifts = ascii_lowercase[n:] + ascii_lowercase[:n]
out_string = ''
for char in in_string:
if not char.isalpha():
@JPLeBreton
JPLeBreton / pb_steal.py
Created September 1, 2015 23:52
First bit of Python code I wrote, December 2nd 2004: calculate "steal chance" in Phantom Brave
charsteal = 93.0
charlev = 260.0
tarsteal = 70.0
tarlev = 477.0
if __name__ == "__main__":
newlev = raw_input("Character Level? ") # raw_input doesn't squawk at empty strings!
if newlev != "":
charlev = float(newlev)