Skip to content

Instantly share code, notes, and snippets.

View Lyoko-Jeremie's full-sized avatar
😊
Today, I'm proud to have pushed human civilization forward again.

LyokoJeremie Lyoko-Jeremie

😊
Today, I'm proud to have pushed human civilization forward again.
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<ModsConfigData>
<version>1.5.4409 rev1118</version>
<activeMods>
<li>brrainz.harmony</li>
<li>ludeon.rimworld</li>
<li>ludeon.rimworld.royalty</li>
<li>ludeon.rimworld.ideology</li>
<li>ludeon.rimworld.biotech</li>
<li>ludeon.rimworld.anomaly</li>
<?xml version="1.0" encoding="utf-8"?>
<ModsConfigData>
<version>1.5.4297 rev1078</version>
<activeMods>
<li>brrainz.harmony</li>
<li>ludeon.rimworld</li>
<li>ludeon.rimworld.royalty</li>
<li>ludeon.rimworld.ideology</li>
<li>ludeon.rimworld.biotech</li>
<li>ludeon.rimworld.anomaly</li>
@Lyoko-Jeremie
Lyoko-Jeremie / .ts
Last active June 22, 2024 03:53
为DoL Phone Mod编写的基于行为状态机的简易树算法(伪•伪代码)
import {uniq} from 'lodash';
export type PathConditionFunctionType = (si: StateInfo, ssi: StateSelectItem, ni: NpcInfo) => boolean;
export interface PhoneInnerState {
}
export interface StateSelectItem {
// == StateInfo::stateKey
parentsStateKey: string;
@Lyoko-Jeremie
Lyoko-Jeremie / gm_config.ts
Last active September 7, 2023 14:27
the GM_config project, translate Javascript code to Typescript code, for use GM_config with TS+Webpack
// from https://github.com/sizzlemctwizzle/GM_config
// translate js code to ts code, by Jeremie
// at https://github.com/sizzlemctwizzle/GM_config/commit/06f2015c04db3aaab9717298394ca4f025802873
// 06f2015c04db3aaab9717298394ca4f025802873
/*
I want to use typescript + webpack to write GM script, and pack the GM_config into project to keep script can always run offline,
but the `.d.ts` defined and `js` impl seems like not work well with webpack.
so I translate the code to pure typescript in [there](https://gist.github.com/Lyoko-Jeremie/3e7d97a5c2eb14d1bc0bb53ae76a4446) ,
@Lyoko-Jeremie
Lyoko-Jeremie / Degrees-of-Lewdity cheats.md
Last active September 6, 2023 21:35
Degrees-of-Lewdity cheats analysis

DOL Cheat Notebook

all the variable in the story script are place in the SugarCube.State.active.variables , so we can list and search and change it like we are useing the CE.

.

memory search

// search a number `2046` that can direct see in game from memory
@Lyoko-Jeremie
Lyoko-Jeremie / webpackJsonp_simple_loader.js
Last active July 7, 2023 05:09
webpackJsonp simple loader
// webpackJsonp simple loader
// call this with `window.__M_resolver("0598")`
// some idea come from https://plnkr.co/edit/xFT4ib5uHqkQ8XIrPqf3?p=catalogue&preview
// all the module have 3 params, and it means :
// 1 the module default exports, will used with `newM.exports={api1,api2,api3}`
// 2 the module export table, will be used with `export val api1; export val api2;`
// 3 the webpack module resolver, module will try to get another module like `m("eff2")` , this is a DI (dependency injection) design pattern
(function () {
window.__M_readFromCache = function (id) {
@Lyoko-Jeremie
Lyoko-Jeremie / Ogre_save_render_window_to_image_file.cpp
Created May 4, 2023 16:59
OGRE save render window to image file
// from https://forums.ogre3d.org/viewtopic.php?t=67447
void HDRCtrl::OnBnClickedSaverender()
{
Ogre::TexturePtr tex = Ogre::TextureManager::getSingleton().createManual(
"MainRenderTarget",
Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
Ogre::TextureType::TEX_TYPE_2D,
m_w,
m_h,
// from https://cplusplus.com/forum/general/226786/
#include <istream>
#include <ostream>
#include <streambuf>
struct IMemBuf: std::streambuf
{
IMemBuf(const char* base, size_t size)
{
@Lyoko-Jeremie
Lyoko-Jeremie / xclip.cpp
Created January 25, 2022 13:38 — forked from babhishek21/xclip.cpp
xClip (Reverse Clip) for Windows - Simulate reverse process of the clip command on Windows
/**
* xClip (Reverse Clip) for Windows
* Author: Abhishek Bhattacharya <[email protected]>
*
* Build Environment:
* Windows 10 Version 1607 (Windows 7 or above should work fine)
* MinGW g++ (GCC) 5.3.0 or above (with flag --std=c++11)
* UPX x3.91 or above
* Runtime Environment:
* Windows 7 or above
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@ Reversing Steam CEG Protection @@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@ by Push_BirthDay_Ret @@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@