Skip to content

Instantly share code, notes, and snippets.

View JohannesDeml's full-sized avatar
🥽
Making Science

Johannes Deml JohannesDeml

🥽
Making Science
View GitHub Profile
@JohannesDeml
JohannesDeml / README.md
Last active April 22, 2024 22:14
Batch convert images with inkscape on windows

Batch convert svg|pdf|eps|emf|wmf|ai|ps|cdr to eps|pdf|png|jpg|tiff|svg|ps|emf|wmf

Screenshot Batch converter for Windows using Inkscape with the command line
InkscapeBatchConvert is an easy to use solution to quickly convert all files of a folder to another type without the need to open Inkscape. The program uses Windows Batch scripting and will only work on Windows.
Tested with Inkscape 1.0.x - 1.3.x ✅ (The last version that supports Inkscape 0.9.x can be found here)

Usage

  1. Download _InkscapeBatchConvert.bat
  2. Put it in the folder where you have files you wish to convert (will also scan on all subfolders for files of input type).
  3. Then double click the file to start it.
@JohannesDeml
JohannesDeml / unity-2022.3.21f1-debug-decompiled_part1.txt
Last active April 12, 2024 07:26
Untiy 2022.3.21f1 wasm decompiled with wasm2js with readable method names
This file has been truncated, but you can view the full file.
// Unity Project: https://github.com/JohannesDeml/UnityWebGL-LoadingTest with commit de7bdf9ac13edc7619f17ebe0713546a44c004f0
// Decompiled with wasm2js (https://github.com/WebAssembly/binaryen) - If you use debug builds you get proper method names
import * as env from 'env';
import * as wasi_snapshot_preview1 from 'wasi_snapshot_preview1';
function Table(ret) {
// grow method not included; table is not growable
ret.set = function(i, func) {
@JohannesDeml
JohannesDeml / README.md
Last active September 16, 2023 01:55
Remove Unity mobile notification warning for WebGL builds

Remove warning

Unity shows the following warning on mobile devices up to Unity 2019.4: "Please note that Unity WebGL is not currently supported on mobiles. Press OK if you wish to continue anyway." This script helps you remove this warning

Live example

To see live examples see Unity Web GL Loading Test

Logic

The script will run after the build has completed and replace the checks from all generated javascript files.

Support

@JohannesDeml
JohannesDeml / README.md
Created June 29, 2021 08:09
Unity WebGL framework code

Unity WebGL engine code

This includes the framework and loader. I took a look at the webassembly code with wasm2js , but it is not that interesting for finding hidden variables.

This gist is meant to help find variables and methods that can help you in development such as UTF8ToString or TOTAL_MEMORY.

@JohannesDeml
JohannesDeml / EditPrefabInScene.cs
Last active May 17, 2023 04:40 — forked from ulrikdamm/EditPrefab.cs
Unity editor script for better editing of prefabs. Put in Assets/Editor.
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine.SceneManagement;
// From https://gist.github.com/JohannesDeml/5802473b569718c9c86de906b7039aec
// Original https://gist.github.com/ulrikdamm/338392c3b0900de225ec6dd10864cab4
// Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser).
// This opens an empty scene with your prefab where you can edit it.
// Put this script in your project as Assets/Editor/EditPrefab.cs
@JohannesDeml
JohannesDeml / CpuDiagnoser.cs
Created January 5, 2023 16:28 — forked from MarkPflug/CpuDiagnoser.cs
BenchmarkDotNet CPU utilization
using BenchmarkDotNet.Analysers;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Engines;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
using BenchmarkDotNet.Validators;
@JohannesDeml
JohannesDeml / .htaccess
Last active October 21, 2022 11:02
Htaccess wordpress config with conveniece, security and chaching in mind
# Secure HTACCESS wordpress config - https://gist.github.com/JohannesDeml/f714e47d6c6ea885f45f70bd34d927f8
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
@JohannesDeml
JohannesDeml / ShaderChunkNames.md
Last active June 17, 2022 12:56
PlayCanvas ShaderChunk names
This file has been truncated, but you can view the full file.
import { a } from 'a';
import { b } from 'a';
import { c } from 'a';
import { d } from 'a';
import { e } from 'a';
import { f } from 'a';
import { g } from 'a';
import { h } from 'a';
import { i } from 'a';
@JohannesDeml
JohannesDeml / README.md
Last active August 13, 2021 10:07 — forked from handcircus/unity.rb
Fastlane action to build Unity Project

Usage

lane :build_unity do
  unity(
    execute_method: 'CommandLineBuild.BuildIos'
  )
end